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
Get step-by-step solutions from verified subject matter experts
