suppose a,b,c and d are different positive integers whose sum is 100, and a-c=5. What is the greatest possible value of ab-cd?

To find the greatest possible value of ab-cd, we need to find the maximum values of a, b, c, and d that satisfy the given conditions.

Let's start by considering the condition a-c=5. Since a and c are positive integers, the only possible values for a and c that satisfy this condition are (a,c) = (6,1) or (a,c) = (7,2).

Now let's consider the condition that the sum of a, b, c, and d is 100. Based on the values of a and c we obtained, we can write two different equations for the sum:

For (a,c) = (6,1):
6 + b + 1 + d = 100,
b + d = 93.

For (a,c) = (7,2):
7 + b + 2 + d = 100,
b + d = 91.

Now, to maximize ab - cd, we should maximize both ab and cd independently.

For ab, we need to maximize the product of a and b. Hence, we should choose the maximum values for a and b. Considering both equations b + d = 93 and b + d = 91, we can see that the maximum possible value for b + d is 93. Therefore, we should consider (b,d) = (93, 0) or (b,d) = (92, 1).

For cd, we need to minimize the product of c and d. Hence, we should choose the minimum values for c and d. Considering both equations b + d = 93 and b + d = 91, we can see that the minimum possible value for b + d is 91. Therefore, we should consider (c,d) = (1,90) or (c,d) = (2,89).

Now, we can calculate the values of ab and cd for each case:

For (b,d) = (93, 0) and (c,d) = (1,90):
ab = 6 * 93 = 558,
cd = 1 * 90 = 90,
ab - cd = 558 - 90 = 468.

For (b,d) = (92, 1) and (c,d) = (1,90):
ab = 7 * 92 = 644,
cd = 1 * 90 = 90,
ab - cd = 644 - 90 = 554.

Based on these calculations, the greatest possible value of ab - cd is 554 when a=7, b=92, c=1, and d=90.