www.cprogramming.tk

www.cprogramming.tk

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. Program that display first five numbers with their squares. Reviewed by Shoaib Jameel on 15:08 Rating: 5

No comments:

Powered by Blogger.