5 20 Lab Countdown Until Matching Digits Write A Program That Takes In An Integer In The Range 11 100 As Input The Out 1 (46.18 KiB) Viewed 35 times
5 20 Lab Countdown Until Matching Digits Write A Program That Takes In An Integer In The Range 11 100 As Input The Out 2 (16.31 KiB) Viewed 35 times
5.20 LAB: Countdown until matching digits Write a program that takes in an integer in the range 11-100 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. End with a newline. Ex: If the input is 93 the output is 93 92 91 90 89 88 Ex. If the input is 41 the output is 11 Ex: If the input is 168 or any number not between 11 and 100 (inclusive), the output is Input must be 11-100 For coding simplicity follow each output number by a space, even the last one
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 same-digit numbers (11,22, 33,99), as that approach would be cumbersome for larger ranges 4019242440278.43ay? LAB ACTIVITY 5.20.1: LAB Countdown until matching digits 0/10
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!