j

Monday, 2 November 2015

Write a program that take a number from user and display its square and cube.



#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n;
cout<<"Enter any number ::";
cin>>n;
cout<<"Square of "<<n<<" is "<<n*n<<endl;
cout<<"Cube of "<<n<<" is "<<n*n*n<<endl;
getch();
}

Subscribe to this Blog via Email :