Question: Write a C program and use while statement to count and sum up the odd integers between 1 and any positive integer number the user

Write a C program and use while statement to count and sum up the odd integers between 1 and any positive integer number the user enters that is greater than 1. Display the sum as a number on the screen.
For example, if the user enters 7 then the output (1+3+5+7=16) should be:
Sum of Odd numbers between 1 and 7 is: 16

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!