In C++, Write a program that will take in a whole number then using the conditio
ID: 3744563 • Letter: I
Question
In C++,
Write a program that will take in a whole number then using the conditional operator determine if the number is odd or even. The conditional operator should assign a value of "Odd" or "Even" to a string variable to be displayed to the screen. Required No cin or cout statments within the conditional operator Only one assignment operator is allowed as part of the conditional operator The conditional operator must assign a value of either "Odd" or "Even" to a variable to be displayed. Processing: Input A whole number Process - Using the condtional operator determine if the number is odd or even Output - A string value that says "Odd" or "Even" dependining upon the processing. Your program should run like the following CAWindows system32cmd.exe CY Enter a nunber and I wil1 Check to see if it is odd or even The number you input is Even Press any key to continue - - -Explanation / Answer
#include using namespace std; int main() { coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.