Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. // whitespace
  2. // whitespace
  3. int main() // declare a "main" function returning int
  4. { // introduce the scope for the definition
  5. int i = // introduce an integer variable called "i" which is initialized
  6. 0; // zero
  7. i++; // increment i
  8. for( // begin for statement
  9. int x = // initialize an integer variable called x
  10. 0; // with zero
  11. x < 10; // repeat loop while x is less than 10
  12. x++ // increment x
  13. ) // end beginning of for statement
  14. { // introduce for statement scope
  15. i += x; // add the value of x to i
  16. } // end for statement scope
  17. // this line intentionally left blank
  18. std::cout // access the stdout object
  19. << i; // and print the value of i
  20. // another blank line for prettyness!
  21. } // end scope of main function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement