Question: Write a program that takes two integers a and b and prints their addition, subtraction, multiplication, division and modulo. If the value of b is
Write a program that takes two integers a and b and prints their addition, subtraction, multiplication, division and modulo. If the value of b is zero, the program should not do the division or modulo because this will crash the program. Instead, the program does all the other operations and show an error message for the division and modulo, as in the second sample below

This is the code i write. when the denominator is zero error come up.
Enter integera: 6 Enter integer b: a-b-6-0-6 a*b = 6*0 = 0 a/b-Cannot divide by zero
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
