Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace DossierProject
- {
- class Program
- {
- static void Main(string[] args)
- {
- DrowBar(40, 5);
- }
- static void DrowBar(int value, int pos)
- {
- int maxValue = 100;
- string bar = "";
- for(int i = 0; i < value - 20; i++)
- {
- bar += '#';
- }
- Console.SetCursorPosition(0, pos);
- Console.Write("[");
- Console.Write(bar);
- bar = "";
- for(int i = value; i <maxValue - 30; i++)
- {
- bar += '_';
- }
- Console.Write(bar + ']');
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment