#include<stdio.h>
int main()
{
int number;
printf("Enter your number:");
scanf("%d",&number);
printf("Square of given number is %d \n", number*number);
printf("Cube of given number is %d", number*number*number);
return 0;
}
Output of the program:
Enter your number:5
Square of given number is 25
Cube of given number is 125
int main()
{
int number;
printf("Enter your number:");
scanf("%d",&number);
printf("Square of given number is %d \n", number*number);
printf("Cube of given number is %d", number*number*number);
return 0;
}
Output of the program:
Enter your number:5
Square of given number is 25
Cube of given number is 125
No comments:
Post a Comment