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++).
#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
#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

