write a program to print cube of integer
Answers
Answered by
1
Answer:
Write a program in C to display the cube of the number upto a given integer.
Pictorial Presentation:
Sample Solution:
C Code: #include <stdio.h> void main() { int i,ctr; printf("Input number of terms : "); scanf("%d", &ctr); for(i=1;i<=ctr;i++) { printf("Number is : %d and cube of the %d is :%d \n",i,i, (i*i*i)); } }
Explanation:
Hope this helps you my best friend
Similar questions