Question: This Program is in the C language, not the C++ language. Write a program that takes two integers a and b and prints their addition,

This Program is in the C language, not the C++ language.

This Program is in the C language, not the C++ language. Write

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. Below are two sample outputs. Your output should match all the format below. Enter integer a:7 Enter integer b:3 a + b = 7+3 = 10 a-b = 7-3 = 4 a* b = 7*3 = 21 a/b = 7/3= 2 a % b = 7 % 3 = 1 Enter integer a:6 Enter integer b:0 a + b = 6+0 = 6 a-b = 6-0 = 6 a* b = 6* 0 = 0 a/b = Cannot divide by zero a% b = Cannot divide by zero

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!