This blog is very helpful for anyone . if u have new program then send me i will post its solution . rzainulabideen@gmail.com
Showing posts with label 1 to n number usingwhile loop. Show all posts
Showing posts with label 1 to n number usingwhile loop. Show all posts
Saturday, 6 September 2014
program of while loop , 1 to n number with their square
#include<iostream>
using namespace std;
int main()
{
int i=1,a;
cout<<"enter the limit : ";
cin>>a;
while( i<=a )
{
cout<<"\t\t"<<i<<"\t\t"<<i*i<<"\n";
i++;
}
return 0;
}
Subscribe to:
Posts (Atom)
