Advertisement
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.Tasks;
- using System.IO;
- namespace CLight
- {
- class Program
- {
- // 4.2. UIElement
- static void Main(string[] args)
- {
- DrawBar(0, 2, 40);
- DrawBar(0, 4, 100);
- DrawBar(0, 6, 10);
- }
- static void DrawBar(int x, int y, int barValue)
- {
- Console.SetCursorPosition(x, y);
- Console.Write("[");
- for (int i=0; i<barValue/10; i++)
- {
- Console.Write("#");
- }
- for (int i = barValue / 10; i < (barValue / 10+(10 - (barValue / 10))); i++)
- {
- Console.Write("_");
- }
- Console.Write("]");
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement