Question: In C++ You are to write a program that takes an integer input from the user. If the value is a number greater than zero,

 In C++ You are to write a program that takes an

In C++

You are to write a program that takes an integer input from the user. If the value is a number greater than zero, you will report to the user whether the number is odd or even. Here are the possibilities. Assume the variable num contains the value inputed from the user 1. If num is positive and odd print The number is odd. There should be no other program output 2. if num is positive and even print "The number is even." There should be no other program output. 3. If num is 0 (zero) print "The number is 0. There should be no other program output. 4. If num is negative print "The number is negative." There should be no other program output You will need to use a combination of if if/else statements to complete this exercise. Here are some helpful hints. The C+ code "return 0:" can be used multiple times within maino. Whenever that code is run the program ends. So for example, if you have input a value from cin into a variable num, the following code will check to see if num is 0, print out the appropriate message, and terminate the program: if (num-e) cout

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!