write a c++ programe for calculating square and cube of the number
Answers
Answered by
2
Explanation:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n;
cout<<"enter the number"<<;
cin>>n>>;
coun<<"the square is "<<(n*n)<<;
cout<<" the cube is"<<(n*n*n)<<:
getch();
}
Answered by
1
Answer:
#include<iostream.h>
#include<conio h>
voud main()
{
clrscr();
int n, sq, cu;
cout<<"\nEnter any number";
cin>>n;
sq=n*n;
cu=n*n*n;
cout<<"\nSquare of the number="<<sq;
cout<<«\nCube of the number="<<cu;
getch();
}
Similar questions
Math,
5 months ago
History,
5 months ago
Social Sciences,
5 months ago
Math,
10 months ago
Math,
10 months ago
CBSE BOARD X,
1 year ago
Math,
1 year ago
Physics,
1 year ago