asked 10.8k views
4 votes
If x and y are positive integers is x - y always positive explain

asked
User Sira Lam
by
8.2k points

2 Answers

3 votes

Answer:

No, if y happens to be a larger integer than x, then the result will be negative.

Explanation:

For example, lets say that x=4 and y=9, so x-y = 4-9 = -5.

But if we were to reverse it and make x=9 and y=4, then x-y = 9-4 = 5.

answered
User Jhbruhn
by
8.4k points
4 votes

Note that x and y are nonzero integers. It means that x and y will always have same sign (both are either positive or negative, since they are nonzero). Hence, xy term is always positive.

answered
User Laurentius
by
7.2k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.