Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace minutnik
- {
- class Program
- {
- static void minute(ConsoleColor Color, int t)
- {
- Console.BackgroundColor = Color;
- for (int i = t; i > 0; i--)
- {
- if (i <= 10)
- {
- Console.ForegroundColor = ConsoleColor.Red;
- }
- if (i <= 3)
- {
- Console.Beep();
- }
- Console.WriteLine("Pozostało {0} sek.", i);
- System.Threading.Thread.Sleep(1000);
- Console.Clear();
- }
- for (int i = 0; i<3;i++) Console.Beep(3000,200);
- }
- static void minute(ConsoleColor Color)
- {
- minute(Color, 60);
- }
- static void minute(int t)
- {
- minute(ConsoleColor.Black, t);
- }
- static void minute()
- {
- minute(ConsoleColor.Black, 60);
- }
- static void Main(string[] args)
- {
- minute();
- minute(120);
- minute(ConsoleColor.Blue);
- minute(ConsoleColor.Blue, 120);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement