C Program To Find Cube Of Any Number Using Functions

#include<stdio.h>
int Calculate_Cube(int Number);
int main()
{
  int number, cube;
  printf(" \n Please Enter any integer Value : ");
  scanf("%d", &number);
  cube = Calculate_Cube(number);
  printf("\n Cube of a given number %d is  =  %d", number, cube);
  return 0;
}
int Calculate_Cube(int Number)
{
	return Number * Number * Number;
}

Output:

 Please Enter any integer Value : 15
 Cube of a given number 15 is  =  3375

Leave a Comment