Your Ad Here

COMPILING AND EXECUTING A C++ PROGRAM


In this lab, you compile and execute a prewritten C++ program, and then answer some
questions about the program.
1. Open the source code file named GoodDay.cpp using Notepad or the text editor of your
choice.
2. Save this source code file in a directory of your choice, and then change to that directory.
3. Compile the source code file. There should be no syntax errors. Record the command
you used to compile the source code file.

______________________________________________________________________________
4. Execute the program. Record the command you used to execute the program and also
record the output of this program.

_____________________________________________________________________________
5. Modify the program so that it displays Congratulations. Save the file as
Congratulations.cpp. Compile and execute.
6. Modify the Congratulations program so that it prints two lines of output. Add a
second output statement that displays “Have a great day.” Save the modified file as
Congratulations2.cpp. Compile and execute the program.


0 comments:

Post a Comment

Popular Posts

Recent posts