Question: CS 1 - LAB 0 5 - Read and Compare Two Integers Develop a C + + application that solves the following problem: Request the
CS LAB Read and Compare Two Integers
Develop a C application that solves the following problem:
Request the user to input a positive even integer number and store it in variable If the
input is invalid, prompt the user to retry the input operation until a valid number is entered.
Repeat the inputvalidation process as in step to obtain a positive odd integer number and
store it in variable Similarly, prompt the uscr to retry the input operation until a valid odd
number is entered.
Compare the values of a and If is greater than or equal to output the message
"The first number a value here is larger or equal than the second value here
Otherwise, output the message
"The second number value here is larger or equal than the first a value here
Note: Use only the programming features that have been covered in chapters
The following is a sample run Use this sequence to test your app
Enter a positive EVEN integer:
Error Expecting a POSITIVE EVEN number Please, try again.
Enter a positive EVEN integer:
Error Expecting a POSITIVE EVEN number Please, try again.
Enter a positive EVEN integer:
Enter a positive ODD integer:
Error Expecting a POSITIVE ODD number Please, try again.
Enter a positive ODD integer:
The first number is larger or equal than the second
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
