#include <iostream.h>
void main()
{
int n ,count=1;
cout<<"First 10 even numbers and their squares:\n";
cout<<"\nNumber\tSquare\n";
for (n=2 ;count<=10; n=n+2)
{
cout<<n<<"\t"<<n*n<<endl;
count++;
}
}
Labels: C++ Basic Codes, C++ Codes
Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies| |
---|
0 comments:
Post a Comment