Question: c programming Write a program that takes in an integer in the range 40-80 as input. The output is a countdown starting from the integer,

 c programming Write a program that takes in an integer inthe range 40-80 as input. The output is a countdown starting from

c programming

Write a program that takes in an integer in the range 40-80 as input. The output is a countdown starting from the integer, and stopping when both output digits are even. Ex: If the input is: 53 the output is: 53 52 51 50 49 48 Ex: If the input is: 44 the output is: 44 Ex: If the input is: 9 or any number not between 40 and 80 (inclusive), the output is: Input must be 40-80 For coding simplicity, follow each output number by a space, even the last one. Use a while loop. Compare the digits; do not write a large if-else for all possible even-digit numbers (40, 42, 44, .., 68), as that approach would be cumbersome for larger ranges. 301608.1764500 301603.1764500 LAB ACTIVITY 16.18.1: LAB 3, P2(Th): Countdown until digits are even 7/10 main.c Load default template... 1 #include 2 3 int main(void) { int num, i; scanf("%d", &num); 5 6 7 8 9 10 11 12 13 if (num 80) { printf("Input must be 40-80"); } else { i = num; while (1) { printf("%d", i); if (i % 17 = 0) { break; } i--; 15 16 17 18 Develop mode Submit mode When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. Submit for grading Signature of your work What is this? 2/4.. R-101310101013013131313161313131316131414131313171314171317..2/4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!