Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace P15
- {
- class Program
- {
- static void Main(string[] args)
- {
- int peshoDmg = int.Parse(Console.ReadLine());
- int goshoDmg = int.Parse(Console.ReadLine());
- int turn = 0;
- int peshoHealth = 100;
- int goshoHealth = 100;
- while (true)
- {
- turn++;
- if (goshoHealth <= 0)
- {
- Console.WriteLine($"Pesho won in {turn}th round.");
- return;
- }
- if (peshoHealth <= 0)
- {
- Console.WriteLine($"Gosho won in {turn}th round.");
- return;
- }
- if (turn % 2 == 0)
- {
- goshoHealth -= peshoDmg;
- Console.WriteLine($"Pesho used Roundhouse kick and reduced Gosho to {goshoHealth} health.");
- }
- if (turn % 3 == 0)
- {
- peshoHealth -= goshoDmg;
- Console.WriteLine($"Gosho used Thunderous fist and reduced Pesho to {peshoHealth} health.");
- goshoHealth += 10;
- peshoHealth += 10;
- }
- if (turn % 2 != 0)
- {
- peshoHealth -= goshoDmg;
- Console.WriteLine($"Gosho used Thunderous fist and reduced Pesho to {peshoHealth} health.");
- }
- if (peshoHealth == 0 || goshoHealth == 0)
- {
- return;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement