Question: The given program below displays numbers from 1 to 20. Modify this program so that it can display the following: 1 2 3 6 7

The given program below displays numbers from 1 to 20. Modify this program so that it can display the following: 1 2 3 6 7 9 11 13 14 17 18 19 Hint: Check the missing numbers in the sequence; do you find any pattern for them? You need to add code for the discovered pattern. If you simply write cout using namespace std; int main() { int num; " num = 1; while(num
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
