Question: Write a program that finds and displays all the odd numbers between 1 and N. The value of N is an integer entered by

Write a program that finds and displays all the

Write a program that finds and displays all the "odd numbers" between 1 and N. The value of N is an integer entered by the user and should be a positive value. a) Prompt the user to input a positive integer. b) Ask them to re-enter if it's not a positive value. c) Identify and display the odd values between 1 and N. Print them on the same line separated by a space or tab. d)What's the average of those odd numbers? Compute and display the average as well.

Step by Step Solution

3.42 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The code is as follow include int main int N ... View full answer

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 Programming Questions!