C++ examples for Operator:Arithmetic Operator

Click the following links for the tutorial for Operator and Arithmetic Operator.

- Shows the use of the mathematical operators:
- A short demonstration of +, -, * and /
- Dividing Two Numbers
- Multiplying Two Numbers
- Subtracting Two Numbers
- Finding the Remainder Between Two Numbers
- Order of precedence for primary operators.
- Add parentheses to change the operator precedence
- Computes video rental amounts and gives appropriate discounts based on the day or customer status.
- Prints daily, weekly, and monthly sales totals.
- Average salaries over $10,000
- Dividing integer variables, Finding Quotients and Remainders
- Subtracting integer variables
- Add 5 to the value stored in total, and take the value and store it back in total.
- Displays the values of three variables before and after they are used in a complex multiple-expression statement.
- Asks the user to enter two numbers, and prints the sum, product, difference, and quotient of the two numbers.
- Read two int number b, c, and assign the product of variables b and c to variable a.
- Calculate the product of three integers
- Comparing integers using if statements, relational operators and equality operators.
- Addition program that displays the sum of two integers.
- Program to check whether 3 values represent a right triangle.
- Program to determine if 3 values make a triangle.
- Calculating a Circle's Diameter, Circumference and Area.
- Enforcing Privacy with Cryptography for integer
- Program to project world population
- Calculating Salaries based various rate and base with a class
- List All Pythagorean Triples up to sides of 500
- Calculate the value of PI from the infinite series,
- Calculates the hypotenuse of a right triangle when the other two sides are given.
- Determines for a pair of integers whether the second is a multiple of the first.
- Use the modulus operator to determine whether an integer is even.
- Converting a length in inches to feet-and-inches.
- Calculating the Body Mass Index.
- Finding the largest of two integers without comparing them.
- Calculating the height of a tree
- Testing for exact division of one integer by another.
- Dividing a cash amount into quarters, nickels, dimes and cents.
- Squaring odd numbers
- Demonstrates arithmetic assignment operators
- Demonstrate remainder operator
- Shows mixed expressions
- Lists cubes from 1 to 10
- Prints numbers raised to fourth power
- Test arithmetic assignment and decrement
- Models calculator
- Summary of Arithmetic Operators
- Determine the output of the following program: the % operator
- Determine the output of the following program: integer truncation
- What is the output of the program: int and arithmetic operator
- Solves for the roots of a quadratic equation