例如,以下是程序的运行示例:
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() 语句中使用)• 继续;• 导出();• 中止();• 转到
我是一名优秀的程序员,十分优秀!