#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
{
int n,sq,c;
clrscr();
cout<<"enter any no: ";
cin>>n;
sq=n*n;
c=n*n*n;
cout<<"square : "<<sq<<" cube "<<c;
getch();
}
output:
enter any no: 7
square: 49 cube: 343
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
{
int n,sq,c;
clrscr();
cout<<"enter any no: ";
cin>>n;
sq=n*n;
c=n*n*n;
cout<<"square : "<<sq<<" cube "<<c;
getch();
}
output:
enter any no: 7
square: 49 cube: 343
0 Comments
Post a Comment