pass_f = 1/30;
prob1 = (15-10)*pass_f + (30-25)*pass_f;
prob2 = (3-0)*pass_f + (18-15)*pass_f;
disp(prob1, "Probability that he waits less than 5 minutes for a bus")
disp(prob2, "Probability that he waits at least 12 minutes for a bus")