|
Lesson 2INPUT, PROCESS, OUTPUT (IPO)The computer is in a constant cycle of input, process, and output. The computer waits for you to enter the required information (input). Based on the entered information, the computer takes the appropriate actions (process). Finally, the result is displayed on the screen or printed out (output). An analogy for input, process and output would be a food processor where food, fruit and other ingredients are put into the machine. Afterward, based on the selected setting, such as cutting, chopping, or mixing, the food processor performs the appropriate task, and finally the desired mixture is ready to be used. THE MAIN SKELETON OF THE C AND C++ PROGRAM A C/C++ program has a
main skeleton, regardless of how large or small it is. Every program
starts with the word main, followed by an open parenthesis and closed
parenthesis. The beginning of the program is marked with an open brace, and
the end of the program is marked with a closed brace. Let me show you the
simplest program one can create in both C and C++. |
This
information was powered by
Prof A, Ebrahimi