Skip to main content

Posts

Showing posts with the label addition operator

C++ Arithmetic Operators Visual Studio

C++ Arithmetic Operators Arithmetic Operators use to perform Arithmetic ( + , - , * , /, % ) tasks between two or more numbers like Addition , Subtraction , Multiplication , Division and Remainder . + Operator also use to concatenation of strings and it will add 2+2 = 4 between numbers In below example we'll use all basic Arithmetic Operators to perform basic tasks. Simple Example of Arithmetic Operators Example Arithmetic Operators #include <iostream> using namespace std;  int main(){      int x = 10 ;      int y = 5 ;      cout <<" X + Y = " << ( x + y ) << endl ;     cout <<" X - Y = " << ( x - y ) << endl ;     cout <<" X * Y = " << ( x * y ) << endl ;     cout <<" X / Y = " << ( x / y ) << endl ;     cout <<" X % Y = " << ( x % y ) << endl ;  return 0...