Pages

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;
}

No comments:

Post a Comment

thnx for visiting my blog