.
the sum of two whole number is 45 and their difference is less than 10. the number of all possible pair is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You are given a system, consisting of one equation and one inequality
    x + y = 45    (1)
    x - y < 10    (2)
Let solve the problem graphically to make the solution visible.
The figure below shows the line  x + y = 45  (red line)  and line y = x - 10 (green line).
The solution set for the system (1), (2) is the set of integer points on the red line, that are ABOVE the green line.
     Plot x + y = 45 (red),  y = x -10 (green)
You can calculate these points manually.
Their number is  (a)  28, if the zero is admitted for x as a whole number,
             or  (b)  27, if the zero is NOT admitted for x as a whole number.
The set of solutions is  (0,45), (1,44), (2,43), (3,42), . . . , (27,18) in case (a)  (28 pairs)
                     or          (1,44), (2,43), (3,42), . . . , (27,18) in case (b)  (27 pairs)
     Plot x + y = 45 (red),  y = x -10 (green)
You can calculate these points manually.
Their number is  (a)  28, if the zero is admitted for x as a whole number,
             or  (b)  27, if the zero is NOT admitted for x as a whole number.
The set of solutions is  (0,45), (1,44), (2,43), (3,42), . . . , (27,18) in case (a)  (28 pairs)
                     or          (1,44), (2,43), (3,42), . . . , (27,18) in case (b)  (27 pairs)