#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<“Enter any number “;
cin>>a;
b=a*a;
c=a*a*a;
cout<<“Square of the entered number is “<<b<<“\n”;
cout<<“Cube of the entered number is “<<c;
getch();
}
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<“Enter any number “;
cin>>a;
b=a*a;
c=a*a*a;
cout<<“Square of the entered number is “<<b<<“\n”;
cout<<“Cube of the entered number is “<<c;
getch();
}
No comments:
Post a Comment