A digital clock shows either 3 or 4 digits at a time. What time do the digits have the greatest sum!

9:59

To find the time when the digits have the greatest sum on a digital clock, we can consider all the possible combinations of 3 or 4 digits in a 24-hour clock.

Let's break it down into two cases:

Case 1: Digital clock shows 3 digits.
For a 3-digit time on a digital clock, the hours can range from 0 to 23 (midnight to 11:00 PM), and the minutes can range from 0 to 59.

To find the time with the greatest sum of digits:
- Start with the first possible 3-digit time: 000.
- Calculate the sum of the digits (0 + 0 + 0 = 0), and store it as the "maximum sum."
- Iterate through all possible 3-digit times and calculate the sum of their digits.
- If the sum is greater than the current maximum sum, update the maximum sum.
- Repeat this process until you reach the last possible 3-digit time: 235.
- The time with the greatest sum of digits will be the one that yielded the maximum sum.

Case 2: Digital clock shows 4 digits.
For a 4-digit time on a digital clock, the hours can range from 00 to 23, and the minutes can range from 00 to 59.

To find the time with the greatest sum of digits:
- Start with the first possible 4-digit time: 0000.
- Calculate the sum of the digits (0 + 0 + 0 + 0 = 0), and store it as the "maximum sum."
- Iterate through all possible 4-digit times and calculate the sum of their digits.
- If the sum is greater than the current maximum sum, update the maximum sum.
- Repeat this process until you reach the last possible 4-digit time: 2359.
- The time with the greatest sum of digits will be the one that yielded the maximum sum.

After comparing the maximum sums obtained from both cases, we can determine which one had the greatest sum of digits.