Aim - Performing Arithematic Operations using C++ Operators.
Arithmetic operators are symbols used in CPP programming to perform arithematic operations on variables and their values. They are important to writing expressions and making decisions in code.
Addition (+): Adds two operands. Example: a + b Subtraction (-): Subtracts the second operand from the first. Example: a - b Multiplication (*): Multiplies two operands. Example: a * b Division (/): Divides the numerator by the denominator. Example: a / b Modulus (%): Returns the remainder of a division operation. Example: a % b
-
Start
-
Input
- Prompt user to enter integer
a
. - Read
a
from user. - Prompt user to enter integer
b
. - Read
b
from user.
- Prompt user to enter integer
-
Calculate
- Compute
sum = a + b
. - Compute
sub = a - b
. - Compute
prdt = a * b
. - Compute
div = a / b
.
- Compute
-
Output
- Display
sum
. - Display
sub
. - Display
prdt
. - Display
div
.
- Display
-
End