Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Exam
- {
- class Program
- {
- static void Main(string[] args)
- {
- int time = int.Parse(Console.ReadLine());
- string name = Console.ReadLine();
- bool checker = false;
- if (time == 0)
- {
- Console.WriteLine("Match has just began!");
- }
- else if (time < 45)
- {
- Console.WriteLine("First half time.");
- }
- else
- {
- Console.WriteLine("Second half time.");
- }
- if (time % 2 == 0)
- {
- checker = true;
- }
- else
- {
- checker = false;
- }
- if (time > 0 && time <= 10)
- {
- Console.WriteLine($"{name} missed a penalty.");
- if (checker)
- {
- Console.WriteLine($"{name} was injured after the penalty.");
- }
- }
- else if (time > 10 && time <= 35)
- {
- Console.WriteLine($"{name} received yellow card.");
- if (!checker)
- {
- Console.WriteLine($"{name} got another yellow card.");
- }
- }
- else if (time > 35 && time < 45)
- {
- Console.WriteLine($"{name} SCORED A GOAL !!!");
- }
- else if (time > 45 && time <= 55)
- {
- Console.WriteLine($"{name} got a freekick.");
- if (checker)
- {
- Console.WriteLine($"{name} missed the freekick.");
- }
- }
- else if (time > 55 && time <= 80)
- {
- Console.WriteLine($"{name} missed a shot from corner.");
- if (!checker)
- {
- Console.WriteLine($"{name} has been changed with another player.");
- }
- }
- else if (time > 80)
- {
- Console.WriteLine($"{name} SCORED A GOAL FROM PENALTY !!!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement