The task is to Add two number using ‘-‘ operator.
Input : 2 3 Output : 5 Input : 10 20 Output : 30
The idea is simple, we subtract -b from a.
- Program for addition of two matrices
- Number formed after K times repeated addition of smallest divisor of N
- C++ Program to concatenate two strings using Operator Overloading
- Divide two integers without using multiplication, division and mod operator | Set2
- Set a variable without using Arithmetic, Relational or Conditional Operator
- Implement *, - and / operations using only + arithmetic operator
- Division without using '/' operator
- C program to check if a given year is leap year using Conditional operator
- Find the remainder when N is divided by 4 using Bitwise AND operator
- Operator Precedence and Associativity in C
- Can we use % operator on floating point numbers?
- Scope Resolution Operator Versus this pointer in C++?
- Ternary Operator in Python
- Operator Functions in Python | Set 1
- sizeof operator in C
- Operator Overloading in C++
- Implementing ternary operator without any conditional statement
- Difference between Relational operator(==) and std::string::compare() in C++
- array::operator[ ] in C++ STL
- Types of Operator Overloading in C++
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.