Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CSLight3
- {
- internal class Program
- {
- private static void Main(string[] args)
- {
- Console.Write("Введите процент здоровья: ");
- PaintHealthbar(int.Parse(Console.ReadLine()));
- Console.WriteLine();
- }
- private static void PaintHealthbar(int proc)
- {
- string healthbar = string.Empty;
- healthbar = healthbar.PadLeft(proc / 10, '#').PadRight(10, '_');
- Console.WriteLine("[{0}]", healthbar);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement