skipter

Character Stats - C# Fundamentals

May 29th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 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. namespace ConsoleApp8
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             var name = Console.ReadLine();
  13.             var currentHealth = int.Parse(Console.ReadLine());
  14.             var maxHealth = int.Parse(Console.ReadLine());
  15.             var currentEnergy = int.Parse(Console.ReadLine());
  16.             var maxEnergy = int.Parse(Console.ReadLine());
  17.  
  18.             Console.WriteLine($"Name: {name}");
  19.             Console.WriteLine("Health: |" + new string('|', currentHealth) + new string('.', maxHealth - currentHealth) + "|");
  20.             Console.WriteLine("Energy: |" + new string('|', currentEnergy) + new string('.', maxEnergy - currentEnergy) + "|");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment