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