Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace nekrach
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Введите ваши ХП от 0 до 100");
- PrintHealBar(Convert.ToInt32(Console.ReadLine()));
- }
- static void PrintHealBar(int hp)
- {
- int n = hp / 10;
- Console.Write("[");
- for(int i = 0; i < 10; i++)
- {
- if (i < n)
- Console.Write("#");
- else
- Console.Write("_");
- }
- Console.Write("[");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement