CPP Arithmetic Operators with Code

Cpp language uses operators to do arithmetic. Arithmetic Operator (AO) is a symbol that performs mathematical operation on data. C++ provides many arithmetic operators. Each of these operators uses two values (called operands) to calculate a final answer.

Arithmetic Operators

Cpp language uses operators to do arithmetic.
Arithmetic Operator (AO) is a symbol that performs mathematical operation on data. C++ provides many arithmetic operators. Each of these operators uses two values (called operands) to calculate a final answer.
Following is list of all arithmetic operators in c++:

  • Addition 
  • Subtraction
  • Multiplication
  • Division
  • Modulus

Addition
The symbol use for addition is ‘+’. It is used to add two numbers in c++.
Example: 2+3 and result is 5.

Subtraction

The symbol use for subtraction in c++ is ‘-’. It is used to minus two numbers.
Example:4-1 ,Output is 3.

Multiplication
The symbol use for multiply two number and use ‘*’ symbol for multiplication in c++.

Division
The symbol use for Division in Cpp is ‘/’.
Example: 6/3 output is 2.

Modulus
The Modulus in c++ is used for gives the remainder of division of two integers. The symbol use for modulus is ‘%’.

Arithmetic operators program


I used Borland C++ compiler to run this program.
#include <iostream>
#include <conio>

int main ()
{
    int a;
    int b;

    cout << " Enter two number for addition" << endl;
    cin>> a;
    cin>> b;
    cout<<" the result is ="<<a+b<< endl;
    cout << " Enter two number for subtraction" << endl;
    cin>> a;
    cin>> b;
    cout<<" the result is ="<<a-b<< endl;
    cout << " Enter two numbers for Multiplication " << endl;
    cin>> a;
    cin>> b;
    cout<<" the result is ="<<a*b<< endl;
    cout << " Enter two number for Division"  <<  endl;
    cin>> a;
    cin>> b;
    cout<< "the result is ="<< a/b;
      getch ();
        return 0;
}
arithmetic operators
arithmetic operators



COMMENTS

Name

andriod.computer trix,1,Blogging,1,Cpp Program,1,CppTutorial,12,create viruse,1,cyber security,2,fb trix,1,gmailtrix,1,laptop screen shot,1,Mobilink,1,notepad tricks,1,notepad viruse,1,PCSREEN SHOT,1,Search engine optimization (SEO),1,seo,1,software,1,Technology,6,tips,1,visitor.seo traffic,1,
ltr
item
Computer Tech Articles: CPP Arithmetic Operators with Code
CPP Arithmetic Operators with Code
Cpp language uses operators to do arithmetic. Arithmetic Operator (AO) is a symbol that performs mathematical operation on data. C++ provides many arithmetic operators. Each of these operators uses two values (called operands) to calculate a final answer.
https://2.bp.blogspot.com/-boOuYC3ULF4/WMK8PZ58EeI/AAAAAAAAA6w/tfbELSbqyw0mmpGF9PujswkjZFGN-t_lACLcB/s400/arithmetic%2Boperators.PNG
https://2.bp.blogspot.com/-boOuYC3ULF4/WMK8PZ58EeI/AAAAAAAAA6w/tfbELSbqyw0mmpGF9PujswkjZFGN-t_lACLcB/s72-c/arithmetic%2Boperators.PNG
Computer Tech Articles
https://rbatec.blogspot.com/2017/03/cpp-arithmetic-operators-Program.html
https://rbatec.blogspot.com/
https://rbatec.blogspot.com/
https://rbatec.blogspot.com/2017/03/cpp-arithmetic-operators-Program.html
true
8514118360251607171
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy