003-001-010

Basic Arithmetic Operations

Easy

Problem Description

Basic Arithmetic Operations

In this problem, you will create a program that reads two integers from standard input, performs four arithmetic operations (addition, subtraction, multiplication, and division), and displays the results to standard output.

Learning Objective: Understand basic operators for addition, subtraction, multiplication, and division

Overview

Read two integers from standard input, perform four arithmetic operations, and output the results.

Input Format

a
b
  • Line 1: integer a
  • Line 2: integer b (non-zero)

Output Format

a + b = [addition result]
a - b = [subtraction result]
a * b = [multiplication result]
a / b = [division result]

Sample Input/Output

Input:

15
4

Output:

15 + 4 = 19
15 - 4 = 11
15 * 4 = 60
15 / 4 = 3

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up