Write a C program to find cube of an integer number using two different methods
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
1) Without using pow() function
In this method, we will just read an integer number and multiply it 3 times.
Consider the program:
Output
2) Using pow() function
pow() is a library function of math.h header file, it is used to calculate power of any number. Here, we will use this function to find the cube of a given number.
Consider the program:
Output
"This is very basic program in C programming language and will be helpful for those who started learning C programming, if you liked, please write comments..."
need an explanation for this answer? contact us directly to get an explanation for this answer