Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program outputs the numbers 1-99 in rows of 15...except that any multiple of 4 is skipped. Make sure to use leading zeroes in
Write a program outputs the numbers 1-99 in rows of 15...except that any multiple of 4 is skipped.
Make sure to use leading zeroes in your output formatting flags.
Hints: use a separate output counter, incrementing that counter inside the for-loop, and output a newline when that output counter % 15 is 0. Also remember that the "continue" statement will cause the current iteration of a loop to immediately stop, and the loop then goes straight to its next iteration.
Format your output like this below.
01 02 03 05 06 07 09 10 11 13 14 15 17 18 19 21 22 23 25 26 27 29 30 31 33 34 35 37 38 39 41 42 43 45 46 47 49 50 51 53 54 55 57 58 59 61 62 63 65 66 67 69 70 71 73 74 75 77 78 79 81 82 83 85 86 87 89 90 91 93 94 95 97 98 99
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started