j

Monday, 2 November 2015

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



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n;
printf("Enter any number ::");
cin>>n;
cout<<"Square of %d is %d”,n,n*n);
cout<<"Cube of %d is %d”,n,n*n*n);
getch();
}

Subscribe to this Blog via Email :