🔒 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
  • 280
    Views
  • 2
    Participants
Last reply from:
zacha

Trending Topics

Online now

Members online
1,069
Guests online
4,549
Total visitors
5,618

Forum statistics

Threads
2,354,200
Posts
29,382,635
Members
1,079,366
Latest member
Francis24
Back
Top