🔒 Closed C language po

Status
Not open for further replies.
Solution
C:
#include <stdio.h>
int main(void){
  int n, cube, i;
printf("Enter an integer: ");
scanf("%d",&n);

cube = 1;
i = 0;
while (i < 3)
{
    cube = cube * n;
    i++;
}

printf("%d\n", cube);  // Here your code !
    
}
C:
#include <stdio.h>
int main(void){
  int n, cube, i;
printf("Enter an integer: ");
scanf("%d",&n);

cube = 1;
i = 0;
while (i < 3)
{
    cube = cube * n;
    i++;
}

printf("%d\n", cube);  // Here your code !
    
}
 
Solution
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 272
    Views
  • 2
    Participants
Last reply from:
zacha

Trending Topics

Online now

Members online
1,203
Guests online
3,815
Total visitors
5,018

Forum statistics

Threads
2,308,726
Posts
29,186,912
Members
1,191,181
Latest member
xxshadowxx
Back
Top