【发布时间】:2011-06-07 19:18:12
【问题描述】:
例如,以下是程序的示例运行:
Enter the hour: 5
Enter the minute: 23
Enter A (for AM) or P (for PM): A
Enter how many minutes to display: 5
The new time is
5:24 AM
5:25 AM
5:26 AM
5:27 AM
5:28 AM
Enter the hour: 11
Enter the minute: 57
Enter A (for AM) or P (for PM): P
Enter how many minutes to display: 4
The new time is
11:58 PM
11:59 PM
12:00 AM
12:01 AM
Enter the hour: 12
Enter the minute: 55
Enter A (for AM) or P (for PM): P
Enter how many minutes to display: 7
The new time is
12:56 PM
12:57 PM
12:58 PM
12:59 PM
1:00 PM
1:01 PM
1:02 PM
另外,我不能使用以下语句:
• 中断; (除非在 switch() 语句中使用) • 继续; • 出口(); • 中止(); • 转到
【问题讨论】:
-
并不是说我们仍然不愿意提供帮助,但这听起来像是功课?