Cube of a number Program in C, CPP, C Plus Plus (C++) with flowchart
Cube of a number Program in C, CPP, C Plus Plus (C++) with the flowchart.
Flowchart for the Cube of a number
Program of Cube of a number in CPP, C Plus Plus (C++).
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#include<iostream> #include<conio.h> using namespace std; int main() { int x,result; cout<<"Enter any number to find its cube= "; cin>>x; result=x*x*x; cout<<"\n The cube of n is= "<<result; getch(); return 0; } |
Output
Program of Cube of a number in C
1 2 3 4 5 6 7 8 9 10 11 12 |
#include<stdio.h> #include<conio.h> int main() { int n,result; printf("Enter any number to find its cube= "); scanf("%d",&n); result=n*n*n; printf("\n The cube of n is=%d ",result); getch(); return 0; } |
Output