flowchart to find athe cube of a given number
Answers
Answered by
1
Answer:
Steps:
1. Declare the variable of 'a' to get the user input.
2. Get the user input value 'a'.
3. Check whether the given 'a' value is a valid number.
4. Calculate the cube for the given value of 'a'.
5. Print the cube value.
Algorithm:
#include <stdio.h>
#include<math.h>
int main()
{
int n, result;
\\ Assigning the value
printf(“\n Enter the integer required: ”);
scanf(“%d”, &n);
\\ Getting the input from user
cube = n * n * n
printf(“\n The cube value for the given number is: ”, result);
return 0;
}
Similar questions