Question: Having issues with passing my testBed. Here I have a C++ program that prompts the user for a positive even number, less than 100. If

Having issues with passing my testBed. Here I have a C++ program that prompts the user for a positive even number, less than 100. If the user enters a number that is not valid, an exception message should be thrown from one function, caught in another and displayed to the user. The testBed is:

"An auto-grading testbed script is provided for you to help evaluate your program. This same testbed script will be used to grade your program. It is pass/fail, so your program must pass the testbed completely for you to receive credit for this assignment. You may run the testbed as many times as you like.

Please note that it is possible to do this assignment without using exceptions, but this will not help you understand the concept, and you will not receive credit if you do not use exceptions."

Here is the code:

Having issues with passing my testBed. Here I have a C++ program

And here are my issues with testBed: that prompts the user for a positive even number, less than 100.

Thanks in advance!

MobaTextEditor File Edit Sah View Format Syntax Special Tools myCheckn3a.opp Summary aSummarles ae not necessary foz checkpolnt assignments 9 10 11include 13using namespace otd: 15 int prompt) 16 [ 1/ int impat l 18 19 cout 100) Chok ing i1mbor in >D DA 29 31 33 4 throw sl.ring("The: numbier cannol. x: a.cer han 109" else if (inpul. Z !-0) //Chris: k i ng il number is (dd throwl.ringl"They numhor Gannol, dd" } else roturn input: 39 40int inputValuea 41 42try 43 inputVa Luo-prompt 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!