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 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
