Write a Program To Input A Number And Display Its Cube In C ( i.e if we input 3 it gives 9)

Hello guys today i am sharing Program To Input A Number And Display Its Cube In C .

 

Here is The Program that you Can Copy and Compile IT .

#include<stdio.h> 
#include <conio.h>
 void main()
 { int n,cube; 
printf("enter an number to get cube "); 
scanf("%d",&n); 
cube=n*n*n; 
printf("the cube of given number is %d",cube); 
getch(); 
}

If You are Using DevC++ than Use int main() Instead Of void main()

Program To Input A Number And Display Its Cube In C

Output of Program To Input A Number And Display Its Cube In C

 

Hope You Will Understand . If you have any issue You can contact Me in my Facebook  .

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

© JANAK KAFLE .All right reserved. Website Designed & Developed By : Janak Kalfe

0
Would love your thoughts, please comment.x
()
x