Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int peshoDmg = int.Parse(Console.ReadLine());
- int goshoDmg = int.Parse(Console.ReadLine());
- int turnCount = 1;
- int peshoHealth = 100;
- int goshoHealth = 100;
- bool peshoTurn = turnCount%2==1;
- bool goshoTurn = turnCount%2==0;
- while (true){
- if (peshoHealth <=0 || goshoHealth <=0){
- break;
- }
- if (turnCount%3==0){
- peshoHealth =peshoHealth+10;
- goshoHealth =goshoHealth+10;
- }
- if (peshoTurn){
- goshoHealth-=peshoDmg;
- Console.WriteLine("Pesho used Roundhouse kick and reduced Gosho to {0} health.", goshoHealth);
- }
- if (goshoTurn) {
- peshoHealth-=goshoDmg;
- Console.WriteLine("Gosho used Thunderous fist and reduced Pesho to {0} health.", peshoHealth);
- }
- turnCount++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement