Write a C program to to input any number from user and calculate cube of a number. How to find the cube of a number using C. It’s a basic programming question in which a number is input by a user and this program calculate cube.
#include #include void main() { int number, cube; printf(" \n Please Enter any integer Value : "); scanf("%d", &number); /* Cube is calculated. */ cube = number*number*number; printf("\n Cube of a given number %d is = %d", number, cube); getch(); }