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
- dot (.) operator in C/C++
- sizeof operator in C
- Operator Overloading in C++
- Division without using '/' operator
- array::operator[ ] in C++ STL
- Types of Operator Overloading in C++
- C++ | Nested Ternary Operator
- Ternary Operator in Python
- Operator Functions in Python | Set 1
- Implement *, - and / operations using only + arithmetic operator
- Increment (++) and Decrement (--) operator overloading in C++
- Can we use % operator on floating point numbers?
- Scope Resolution Operator Versus this pointer in C++?
- Set a variable without using Arithmetic, Relational or Conditional Operator
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.