Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class StartUp
- {
- static void Main()
- {
- int peshoDamage = int.Parse(Console.ReadLine());
- int goshoDamage = int.Parse(Console.ReadLine());
- int peshoHealth = 100;
- int goshoHealth = 100;
- int counter = 1;
- while(peshoHealth>0 || goshoHealth>0)
- {
- if (counter % 2 == 1)
- {
- goshoHealth -= peshoDamage;
- if (goshoHealth <= 0)
- {
- Console.WriteLine($"Pesho won in {counter}th round.");
- break;
- }
- Console.WriteLine($"Pesho used Roundhouse kick and reduced Gosho to {goshoHealth} health.");
- }
- if (counter % 2 == 0)
- {
- peshoHealth -= goshoDamage;
- if (peshoHealth <= 0)
- {
- Console.WriteLine($"Gosho won in {counter}th round.");
- break;
- }
- Console.WriteLine($"Gosho used Thunderous fist and reduced Pesho to {peshoHealth} health.");
- }
- if (counter%3==0)
- {
- peshoHealth += 10;
- goshoHealth += 10;
- }
- counter++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement