200k views
1 vote
A simple calculator to accept two numbers and print the addition, subtraction, multiplication and division of the two numbers.You are required to store each input number in a separate variable.

Hints

1. For practice please see lab exercises in the lesson section
2. You should also store each calculation in a variable
3. You will get an error if you divide by zero, you will address this problem next assignment

User PovilasID
by
8.2k points

1 Answer

3 votes

Answer:

I have attached the source code and output hope it will help you.

Step-by-step explanation:

A simple calculator to accept two numbers and print the addition, subtraction, multiplication-example-1
A simple calculator to accept two numbers and print the addition, subtraction, multiplication-example-2
User Tmbo
by
8.4k points