Computer Science, asked by samitojha, 11 months ago

write a c++ programe for calculating square and cube of the number​

Answers

Answered by Anonymous
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 Soñador
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