Question: Improve this simple program so that it prints a message when the user inputs invalid data. Add code to throw the exception manually using
Improve this simple program so that it prints a message when the user inputs invalid data. Add code to throw the exception manually using the throw keyword when a user inputs 0. #include using namespace std; int main(void) { int a = 8, b = 0, c = 0; cin > b; try { /Your code here C = a / b; } // Your code here cout
Step by Step Solution
3.48 Rating (158 Votes )
There are 3 Steps involved in it
implementing this program using JAVA as my programming language In this program I am adding exceptio... View full answer
Get step-by-step solutions from verified subject matter experts
