Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace NeighBourFight
- {
- class Program
- {
- static void Main()
- {
- var peshoDamage = int.Parse(Console.ReadLine());
- var goshoDamage = int.Parse(Console.ReadLine());
- int peshoHP = 100;
- int goshoHP = 100;
- int turn = 0;
- do
- {
- if (turn % 2 == 0)
- {
- goshoHP -= peshoDamage;
- if (goshoHP <= 0)
- {
- Console.WriteLine($"Pesho won in {turn + 1}th round.");
- return;
- }
- Console.WriteLine($"Pesho used Roundhouse kick and reduced Gosho to {goshoHP} health.");
- }
- else
- {
- peshoHP -= goshoDamage;
- if (peshoHP <= 0)
- {
- Console.WriteLine($"Gosho won in {turn + 1}th round.");
- return;
- }
- Console.WriteLine($"Gosho used Thunderous fist and reduced Pesho to {peshoHP} health.");
- }
- if ((turn + 1) % 3 == 0)
- {
- peshoHP += 10;
- goshoHP += 10;
- }
- turn++;
- } while (true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement