lolblach333

Untitled

Apr 16th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace DossierProject
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. DrowBar(40, 5);
  11. }
  12. static void DrowBar(int value, int pos)
  13. {
  14.  
  15. int maxValue = 100;
  16. string bar = "";
  17.  
  18. for(int i = 0; i < value - 20; i++)
  19. {
  20. bar += '#';
  21. }
  22. Console.SetCursorPosition(0, pos);
  23. Console.Write("[");
  24.  
  25. Console.Write(bar);
  26. bar = "";
  27.  
  28. for(int i = value; i <maxValue - 30; i++)
  29. {
  30. bar += '_';
  31. }
  32.  
  33. Console.Write(bar + ']');
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment