input two numbers and prints its square and cube

/* print input two numbers and prints its square and cube */


#include
#include
void main()
{
int i;
clrscr();
printf("enter number: ");
scanf("%d",&i);
printf("\nsquare of number is %d",i*i);
printf("\ncube of number is %d",i*i*i);
getch();
}

0 comments:

Post a Comment