Blog Introductions

In this  blog contains tutorials about  HTML Tutorials, Python Tutorials, CSS Tutorials, How to, PHP Tutorials, Java Tutorials, C++ Tutorials, Tutorials,  Examples, Source code,Learning,Tips and Software development  services. C++ Operators and Variable  Operation  | C++ tutorials Bestitworrior


C++ Operators and  C++ Variable Operation


C++ tutorials



Operators use to perform operation on variables.C++ perform addition , multiplication, subtraction , division , modulus , Increment and decrement.By Using givien operators we perform certain operations on variables


   Some Key Points of C++ Operators

  1. Operators use to perform operation on variables.
  2. C++ perform '+' Addition to add togeather two values x+y.
  3. C++ perform '-' Subtraction to subtract two values x-y.
  4. C++ perform '*' Multiplication to Multiply togeather two values x*y.
  5. C++ perform '/' Division to divide two values x/y.
  6. C++ perform '%' Modulus return division remender x%y.
  7. C++ perform '++' Increment to increase the value by 1.
  8. C++ perform '--' Decrement to decrese the value by 1.

                             

Code




#include <iostream>
using namespace std;

int main() {

int var1 = 200;
int var2 = 100;

int add,sub,div,mul,modulus;

add = var1 + var2;

sub = var1 - var2;

div = var1 / var2;

mul = var1 * var2;

modulus = var1 % var2;

cout<<add;
cout<<endl;
cout<<sub;
cout<<endl;
cout<<div;
cout<<endl;
cout<<mul;
cout<<endl;
cout<<modulus;
cout<<endl;



return 0;

}





OutPut



300
100
2
20000
0





I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back about 
C++ Operators and Variable  Operation  | C++ tutorials Bestitworrior