- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# How can we subtract two positive or negative integers?

__Solution:__

Subtracting two positive integers

$ a - b$ where a and b are any two integers such that $a > b$

Example:

$5 - 3 = 2$

$a - b$ where a and b are any two integers such that $b > a$

$3 - 5 = -2$

Subtracting two negative integers

$ (-a) - (-b)$ where a and b are any two positive integers such that $a > b$

Example

$ (-5) - (-3) = -5 + 3 = -2$

$(-a) - (-b)$ where a and b are any two positive integers such that $b > a$

$ (-3) - (-5) = -3 + 5 = +2$

Advertisements