Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int peshoDamage = int.Parse(Console.ReadLine());
- int goshoDamage = int.Parse(Console.ReadLine());
- int peshoHealth = 100;
- int goshoHealth = 100;
- int round = 1;
- string peshoAtack = "Roundhouse kick";
- string goshoAtack = "Thunderous fist";
- while (true)
- {
- if (round % 2 == 1)
- {
- goshoHealth -= peshoDamage;
- if (goshoHealth <= 0)
- {
- Console.WriteLine("Pesho won in {0}th round.", round);
- break;
- }
- else
- {
- Console.WriteLine("Pesho used {0} and reduced Gosho to {1} health.", peshoAtack, goshoHealth);
- }
- if (round % 3 == 0)
- {
- peshoHealth += 10;
- goshoHealth += 10;
- }
- }
- else
- {
- peshoHealth -= goshoDamage;
- if (peshoHealth <= 0)
- {
- Console.WriteLine("Gosho won in {0}th round.", round);
- break;
- }
- else
- {
- Console.WriteLine("Gosho used {0} and reduced Pesho to {1} health.", goshoAtack, peshoHealth);
- }
- if (round % 3 == 0)
- {
- peshoHealth += 10;
- goshoHealth += 10;
- }
- }
- round = round + 1;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment