asked 112k views
4 votes
Write a c++ prgm to find the cube of given number

1 Answer

3 votes
This function will find the cube of the inputed number.

void cube(int num){

int calculatedValue;

calculatedValue = num * num * numl;

printf("The cube of %d is %d", num, calculatedValue);

}

Note: This is only a function and the (num) variable is already inputed in the main and passed down to this fucntion
answered
User Vineet Menon
by
8.0k points

No related questions found