C Program to find square and cube of given number

Problem Statement

You need to write a program in C to find the square and cube of a given number.


int main()
int n;
printf("Enter a number");
printf("\nSquare of the number %d is %d",n,n*n);
printf("\nCube of the number %d is %d",n,n*n*n);
return 0;

Leave Your Comment