Skip to content

Instantly share code, notes, and snippets.

@sprintr
Created January 26, 2013 12:47
Show Gist options
  • Save sprintr/4642112 to your computer and use it in GitHub Desktop.
Save sprintr/4642112 to your computer and use it in GitHub Desktop.
Using for loop takes the square of first 10 numbers
#include <iostream.h>
void main(void)
{
int i;
for(i = 1; i <= 10; i++)
cout << "Square of " << i << ": " << i * i << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment