Answered step by step
Verified Expert Solution
Link Copied!

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

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

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions