write a complete program to find the cube of anumber using function
Answers
Answered by
0
Answer:
This is easy, but we need to write a separate function for this simple statement.
First assign a meaningful name to the function, say cube() .
The function should accept a number whose cube is to be calculated. Hence, function definition is cube(double num) .
Finally, the function should return cube of num passed.
Answered by
0
Introduction
#include <stdio.h>
// Function declaration.
double cube(double num);
int main()
{
int num;
double c;
//Inputting number from user.
Similar questions
Math,
11 days ago
Math,
11 days ago
Math,
11 days ago
English,
24 days ago
Computer Science,
24 days ago