Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace NeighbourWars
- {
- class NeighbourWars
- {
- static void Main(string[] args)
- {
- int peshoDamage = int.Parse(Console.ReadLine());
- int goshoDamage = int.Parse(Console.ReadLine());
- int peshoHealth = 100;
- int goshoHealth = 100;
- int round = 0;
- while (peshoHealth > 0 && goshoHealth > 0)
- {
- if (round % 2 == 0)
- {
- goshoHealth -= peshoDamage;
- Console.WriteLine($"Pesho used Roundhouse kick and reduced Gosho to {goshoHealth} health.");
- }
- if (round % 2 != 0)
- {
- peshoHealth -= goshoDamage;
- Console.WriteLine($"Gosho used Thunderous fist and reduced Pesho to {peshoHealth} health.");
- }
- round++;
- if (round % 3 == 0)
- {
- goshoHealth += 10;
- peshoHealth += 10;
- }
- }
- Console.WriteLine();
- if (peshoHealth <= 0)
- {
- Console.WriteLine($"Gosho won in {round}th round.");
- }
- else
- {
- Console.WriteLine($"Pesho won in {round}th round.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement