// Justin C. Miller
// University of Wisconsin Oshkosh
// Made for: http://www.geocities.com/neonprimetime.geo/index.html
// Date: 2001
// Borland Builder 4.0
// >> , << , cout , cin , return , main()
#include
// when compiling, the compiler looks for and starts
// execution in whatever file the main() function is found
int main()
{
// this is a comment, the compiler just ignores me
/*
i am also a comment
comments are used to help the
programmer remember how to do
something or explain what he/she's done
*/
// cout prints standard output to the screen
// so the following statement will be displayed on the screen
// << is the insertion opertor
// it puts the string "hello world" into the output stream
// which in turn is shown on the screen
cout << "Hello World!" << endl ;
// endl is used to go to the next line
// so if i have another cout statement
// it will start on the next line
int age ; // creates a integer variable to store my age in
// >> is the extraction operator
// it grabs info from the output stream
cin >> age ; // cin reads in from the keyboard
// so if you type a number in, it's stored as your age
// you can ouput statements by putting them in ""
// you can also output a variable by simply doing the following
cout << "My Age is " << age << endl ;
getch() ;
// notice that we call the main function looking like below...
// int main()
// notice the int, this means that the function is to return
// an integer
return 0 ; // typically you return 0 if the run was successful
// and 1 if the run was unsuccesful
// since the function must've worked properly to get this
// far, we return a 0
}
// OUTPUT
//
// Hello world!
// My Age is 19
               (
geocities.com/neonprimetime.geo/cpp)                   (
geocities.com/neonprimetime.geo)