Professional Documents
Culture Documents
This lab activity is to demonstrate the basic steps involved in coding, compiling,
executing, and testing a program in the Dev-C++ Integrated Development
Environment (v4.9.9.2). You can obtain and install his software (Dev-C++ 5.0 beta
9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2) on you home computer by following
the instruction from his official website: http://www.bloodshed.net/dev/devcpp.html.
Run setup program, accept all default options.
2. From the "File" menu, choose "New Source File" (or click on the "Source file"
button, the third from the left on the button bar (just under the menu bar). An
insert cursor (vertical blinking line) will appear in the edit window.
3. Type the following line. Use the backspace key as necessary to correct typos:
5. When you return to Dev-C++, the name of your file should appear in the tab
above the text window. Now enter the rest of the program. Use the cursor
arrow keys or mouse and the backspace or delete keys to correct your typos.
6. When you have finished entering the program, save it by clicking on the
diskette icon (the fourth one from the left) on the button bar (or File >> Save).
8. If you typed the above program perfectly, the Compile Progress status window
will display the status "Done", with 0 errors and 0 warnings. If this is not the
case, you have syntax errors (typos) in your program that need to be fixed
before it can be run. To do this:
9. Repeat steps 6-8 until you have corrected all your syntax errors.
10. Run your program: Close the Compile Progress window, and from the Execute
menu chose "Run" (or click on the second icon from the left on the second
button bar).
11. A console window will appear and your program will be running. Your
program will accept data, and compute and display the result and the message
"Press any key to continue." When you do, the console window will close and
you will return to Dev-C++. If you want to execute your program again, from
the "Execute" menu, choose "Run". This program should work fine, but
usually you will find logic errors in it that will need to be corrected by
repeated analysis, editing, compiling, and testing.
12. When you are finished, exit Dev-C++ from the File menu.