Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // whitespace
- // whitespace
- int main() // declare a "main" function returning int
- { // introduce the scope for the definition
- int i = // introduce an integer variable called "i" which is initialized
- 0; // zero
- i++; // increment i
- for( // begin for statement
- int x = // initialize an integer variable called x
- 0; // with zero
- x < 10; // repeat loop while x is less than 10
- x++ // increment x
- ) // end beginning of for statement
- { // introduce for statement scope
- i += x; // add the value of x to i
- } // end for statement scope
- // this line intentionally left blank
- std::cout // access the stdout object
- << i; // and print the value of i
- // another blank line for prettyness!
- } // end scope of main function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement