C# How to Program: Adding minutes to current time: Using C# Mod (%) and C# String.Split

3
2



C# How to Program: Adding minutes to current time: Using C# Mod (%) and C# String.Split

Write a C# program which read the current time from the user in HH:MM format and a displacement in minutes and calculates and displays the new time by adding the displacement.
EXAMPLE: The current time is 2:37 pm and it is given as 14:37 in 24-hour format. All times should be in 24-hour format in this assignment.
When 30 minutes is added to the current time, then the time becomes 15:07. The new time is also displayed in 24-hour format.
EXAMPLE: The current time is 10:43 am and it is given in 24-hour format. When 1200 minutes, i.e. 20 hours, is added to the current time, then the time becomes 06:43.
The new time is also displayed in 24-hour format.

DOWNLOAD SOURCE CODE:

Nguồn:https://wijstaanvooronzegrondrechten.org/

Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here