SHARE
TWEET

Задание 4.8 Смирнов

a guest Aug 14th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace CSLight3
  4. {
  5.     internal class Program
  6.     {
  7.         private static void Main(string[] args)
  8.         {
  9.             Console.Write("Введите процент здоровья: ");
  10.             PaintHealthbar(int.Parse(Console.ReadLine()));
  11.             Console.WriteLine();
  12.         }
  13.  
  14.         private static void PaintHealthbar(int proc)
  15.         {
  16.             string healthbar = string.Empty;
  17.             healthbar = healthbar.PadLeft(proc / 10, '#').PadRight(10, '_');
  18.             Console.WriteLine("[{0}]", healthbar);
  19.         }
  20.     }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top