🔒 Closed C language po

Status
Not open for further replies.

zacha

Forum Veteran
1653360471374.png
1653360494111.png
 
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
  • 223
    Views
  • 2
    Participants
Last reply from:
zacha

Online now

Members online
845
Guests online
2,573
Total visitors
3,418

Forum statistics

Threads
2,276,109
Posts
28,967,662
Members
1,231,121
Latest member
hgfnbvcc
Back
Top