Aim - To perform Arithematic Operations
Arithmetic operators are used to perform arithematic operations on variables and their values.
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
afrom user. - Prompt user to enter integer
b. - Read
bfrom 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
-
Conclusion
In this experiment we learned how to use arithmetic operators