Answer to Question #263437 in C for darshan

Question #263437

Rahul wants to find the cube of integers. Help him to develop a program in C to display the

cube of the number up to given an integer using for loop


1
Expert's answer
2021-11-09T11:50:45-0500
#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));     
    }
 }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS