Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Old MathJax webview write a program that ask the user to enter a series of integer between 10 and 50 Question 1 (50 points]: Write

Old MathJax webview

image text in transcribed

image text in transcribed

write a program that ask the user to enter a series of integer between 10 and 50

Question 1 (50 points]: Write a program that finds if a positive number is even or odd. The program must numbers and check it until the user enters a zero or negative number Sample run1: Enter a positive integer: 10 10 is even Enter a positive integer: 5 5 is odd Enter a positive integer: 4 4 is even Enter a positive integer: -3 Good Bye! Sample run2: Enter a positive integer: 7 7 is odd Enter a positive integer: 8 8 is even Enter a positive integer: 0 Good Bye! Write a program that asks the user to enter a series of numbers between 10 and 50, the program should display the average of the odd numbers only. The program stops if the user enters 0. Hint: use While loop Sample run 1: Enter a number between 10 and 50: 9 Wrong input. Sample Run 2: Enter a number between 10 and 50: 90 Your number should be between 10 and 50. Sample Run 3: Enter a number between 10 and 50: 45 Enter a number between 10 and 50: 34 Enter a number between 10 and 50: 12 Enter a number between 10 and 50: 13 Enter a number between 10 and 50: 0 The sum of odd numbers is: 29 Solution + Screenshot of the run

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

What are the key components in valuing a new or growing venture?

Answered: 1 week ago

Question

=+a) Show that mixing implies ergodicity.

Answered: 1 week ago

Question

e. What are notable achievements of the group?

Answered: 1 week ago