Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ 1. If-else Statements Write a program that reads in an integer as input, then outputs POSITIVE if the integer is positive and NEGATIVE if
C++
1. If-else Statements Write a program that reads in an integer as input, then outputs "POSITIVE" if the integer is positive and "NEGATIVE" if it is negative, and "ODD" if the integer is odd and "EVEN" if the integer is even. 2. While Loops Modify the program from the previous exercise so that it keeps reading integers and classifying them as POSITIVE or NEGATIVE and ODD or EVEN until the user inputs 0, at which point the program ends. No classification should be produced for the 0. You may use a while loop or a do-while loop.
Step 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