Skip to content

tashwitab/Arithmetic-operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Arithmetic-operations

TITLE: Arithmetic operations

AIM: To write a program using arithmetic operators

THEORY: Arithmetic operators in C++ are used to perform basic mathematical operations on numerical data types. Here are the common arithmetic operators in C++:

    1:Addition +: Adds two operands together.
    2: Subtraction -: Subtracts the right operand from the left operand.
    3: Multiplication *: Multiplies two operands.
    4: Division /: Divides the left operand by the right operand.
    5: Modulus %: Computes the remainder of the division of the left operand by the right operand.

ALGORITHM:

       1. Start 
       2. Declare two integer variables: num1 and num2.
       3. Initialize num1 with the value 70 and num2 with the value 12.
       4.Display "num1+num2 = " followed by the result of num1 + num2.
       5. Display "num1-num2 = " followed by the result of num1 - num2.
       6. Display "num1*num2 = " followed by the result of num1 * num2.
       7. Display "num1/num2 = " followed by the result of num1 / num2.
       8. Display "num1%num2 = " followed by the result of num1 % num2.
       9.Display "num1%num2 = " followed by the result of num1 % num2.
       10. End        

CONCLUSION: The arithmetic operators are used in the program.

About

Programs about Arithmetic operations in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages