Question: Write a loop that prints out odd numbers between 1 to n (inclusive) and even number between 1 to n (inclusive) where n is an

 Write a loop that prints out odd numbers between 1 to

Write a loop that prints out odd numbers between 1 to n (inclusive) and even number between 1 to n (inclusive) where n is an integer number entered by a user and n must be larger than 1. Example Enter an integer: 5 Odd: 1 35 Even: 24 Enter an integer: 8 Odd: 135 7 Even: 2 4 6 8 Enter an integer: -10 Invalid input Bye! Example: Example

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!