Music by Umair

 


 C++ Operators

Define Operators

š  A The operator is a symbol that tells the compiler to perform specified mathematical operation.

š  For Example

š  We use the “ + ” Operator add together two values

š  Int x= 4+5;

Some Operator

š  Arithmetic Operator

š  Assignment Operator

š  Comparison Operator

š  Logical Operator

Arithmetic Operator

š  This Video Explain Only Arithmetic Operator

š  SO Please subscribe to my channel like and share video Please.

Arithmetic Operator

š  Arithmetic Operators are used to performing mathematical operations.

š  For Example

š  + , - , * , / , % , ++ , --

š  All the Arithmetic Operators

Arithmetic Operator

OperatorNameDescriptionExample
" + "Add,Sum,AdditionSum two ValuesA+B
" - "SubtractionSubtracts one value to another A-B
" * "MultiplicationMultiply two valuesA*B
%ModulusReturn the division remainder  A%B
" / "DivisionDivided one Value to anotherA/B
" ++ "IncrementIncrease the Value one++A
" -- "DecrementDecrement the Value one--A

Watch Video

For Example

//Arithmetic Operator

#include<iostream>

Using namespace std;

Main()

{

//Addition Operator

Int a=5;

Int b=3;

//create two variable

Cout<<a+b;

//output on Screen

//Same code use any mathematic function

}

Display

Output Screen: 8

 Other Program Use only change and replace value + to - ,/,*,% etc.;

Post a Comment

Virtually nothing is impossible in this world if you just put your mind to it and maintain a
positive attitude.

أحدث أقدم