about the code:
at the beginning:
// your name
// a description of the program
// information pertinent to the program
All programs should
begin with a comment identifying the programmer and the purpose of the program.
Preprocessor directives begin with # and tell the computer to find
the filename that follows and read it in. The file
is used by cout.
is used to clear the screen.
should always be your first "header" file.
code begins the actual program. EVERY C++ program has a main( )
function. A function is a block of code that performs one or more
actions. While functions are usually called within a program, main(
) is called automatically. You may see various adaptations of this
line of code. While other adaptations are allowed, be sure to
maintain "int" as the return type because every ANSI-compliant C++
program will return zero to the IDE.
cout<< "This is a literal print.\n";
Between the French curly
braces is the body of function
main( ). It is indented and terminates by returning 0 to the IDE.
* clears the screen,
This is a literal print.
to the screen.