Program that display first five numbers with their squares.
While Loop program that display five numbers with their squares.
using namespace std;
#include<iostream>
#include<conio.h>
int main()
{
int n;
n=1;
cout<<"No.\tSquare"<<endl;
while(n<=5)
{
cout<<n<<"\t"<<n*n<<endl;
n++;
}
getch();
return 0;
}
Result/Output |
You can also find:-
square root
square numbers
Program that display first five numbers with their squares.
Reviewed by Alpha
on
3/18/2017 03:08:00 pm
Rating:
No comments: