Answered step by step
Verified Expert Solution
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
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 runStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started