Question: PROGRAMMING IN C++; Using While, print the following series 1 3 5 7 9 .. n(if n is an odd number) 2 4 6 8

PROGRAMMING IN C++;

Using While, print the following series 1 3 5 7 9 .. n(if n is an odd number) 2 4 6 8 10 . n (if n is an even number) a) Ask user for n (n cannot be greater than 100) b) Find if it is an even/odd number (use mod operation) c) Print the series.

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!