kirililchev3

Character Stats

May 16th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace CharacterStats_Alternative
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var name = Console.ReadLine();
  14.             var health = int.Parse(Console.ReadLine());
  15.             var healthMax = int.Parse(Console.ReadLine());
  16.             var energy = int.Parse(Console.ReadLine());
  17.             var energyMax = int.Parse(Console.ReadLine());
  18.             var healthEmpty = healthMax - health;
  19.             var energyEmpty = energyMax - energy;
  20.  
  21.             Console.WriteLine("Name: {0}", name);
  22.  
  23.             Console.Write("Health: " + "|");
  24.             Console.Write("{0}{1}", new string('|', health), new string('.', healthEmpty));
  25.             Console.WriteLine("|");
  26.  
  27.             Console.Write("Energy: " + "|");
  28.             Console.Write("{0}{1}", new string('|', energy), new string('.', energyEmpty));
  29.             Console.WriteLine("|");
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment