Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _15._Neighbour_Wars
- {
- class Program
- {
- static void Main(string[] args)
- {
- int damagePesho = int.Parse(Console.ReadLine());
- int damageGosho = int.Parse(Console.ReadLine());
- int healthPesho = 100;
- int healthGosho = 100;
- int x = 0;
- if (damageGosho==damagePesho && damageGosho == 0)
- {
- Console.WriteLine("Pesho won in 1th round.");
- return;
- }
- for (int i = 1; i > 0; i++)
- {
- x++;
- if (i % 2 != 0)
- {
- healthGosho -= damagePesho;
- if (healthGosho > 0)
- {
- Console.WriteLine($"Pesho used Roundhouse kick and reduced Gosho to {healthGosho} health.");
- }
- }
- else
- {
- healthPesho -= damageGosho;
- if (healthPesho > 0)
- {
- Console.WriteLine($"Gosho used Thunderous fist and reduced Pesho to {healthPesho} health.");
- }
- }
- if (i % 3 == 0)
- {
- healthGosho += 10;
- healthPesho += 10;
- }
- if (healthGosho <= 0)
- {
- Console.WriteLine($"Pesho won in {x}th round.");
- return;
- }
- if (healthPesho <= 0)
- {
- Console.WriteLine($"Gosho won in {x}th round.");
- return;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement