Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- namespace P01.Clock
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- //Older version -> this will not work
- //Console.WriteLine($"Кирилица на конзолата!");
- //Outer -> Hour
- //Inner -> Minutes
- //For each hour -> loop through all minutes inside the hour
- for (int hour = 0; hour <= 23; hour++)
- {
- for (int minutes = 0; minutes <= 59; minutes++)
- {
- for (int seconds = 0; seconds <= 59; seconds++)
- {
- //Delay 10-15-100ms
- Console.WriteLine($"{hour:d2}:{minutes:d2}:{seconds:d2}");
- //1 op -> 1-10ms
- Thread.Sleep(1000);
- }
- }
- //Speaker -> produce sound
- //Console.WriteLine($"Another hour has just passed! Tu-tu!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement