Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- namespace random_loading
- {
- class Program
- {
- static void Main(string[] args)
- {
- Thread.Sleep(300);
- Console.WriteLine("Connecting, it may take a few seconds ...");
- Thread.Sleep(4000);
- Console.WriteLine("Connection established!");
- Thread.Sleep(1000);
- Console.Clear();
- Thread.Sleep(300);
- Random rand = new Random();
- int rand2 = rand.Next(1, 7);
- for (int i = 1; i < 101; i = i + rand2)
- {
- int rand1 = rand.Next(0, 300);
- rand2 = rand.Next(1, 7);
- Console.Clear();
- if (i >= 96)
- {
- i = 100;
- }
- Console.WriteLine("Downloading virus: {0}%", i);
- Thread.Sleep(rand1);
- }
- Thread.Sleep(400);
- Console.WriteLine("Done!");
- Thread.Sleep(700);
- for (int i = 1; i < 101; i = i + rand2)
- {
- int rand1 = rand.Next(0, 300);
- rand2 = rand.Next(1, 7);
- Console.Clear();
- if (i >= 96)
- {
- i = 100;
- }
- Console.WriteLine("Installing: {0}%", i);
- Thread.Sleep(rand1);
- }
- Thread.Sleep(400);
- Console.WriteLine("Done too!");
- Thread.Sleep(300);
- }
- }
- }
Add Comment
Please, Sign In to add comment