2. What output values are displayed by the following while loop for a data value of 5? P#233 I printf("Enter an integer"); scanf("%d",&x); product = x; count = 0; while (count <4) { printf("%d\n", product); product = x; count += 1; }
3. What errors do you see in the following fragment? Correct the code so it displays all multiples of 4 from 0 through 100. P#243 for mult4 = 0; mult4 <100; mult 4 + 4; printf("%d\n", mult4);
#p243 4. a. Trace the following program fragment: j = 10; for (i = 1;i<= 5; ++i) { printf("%d%d\n", i, j); j -= 2;
b. Rewrite the previous program fragment so that it produces the same out-put but uses O as the initial value of i. 5. What is the difference between while and do-while loop? D) Focus
2. What output values are displayed by the following while loop for a data value of 5? P#233 I printf("Enter an integer"
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
2. What output values are displayed by the following while loop for a data value of 5? P#233 I printf("Enter an integer"
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!