- codewithshiva

Latest

Search Bar

Friday, July 2, 2021

 The Ashes! (But One day)

Description

You are given two numbers where first number is score of Australian team and second number is score of England.

Comment who wins the match.

If match ends in a tie, print "Tie" (without quotes), else print the name of Winner

Input

Input Format :

First and the only line contains 2 space separated integers denoting scores of Australia and England respectively.


Constraints :

Both score <450

Output

Output one string(either Australia or England) which is the name of Winning team

Sample Input 1 

46 67

Sample Output 1

England


import java.util.Scanner;

public class Main {

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int eng= sc.nextInt();
int asu= sc.nextInt();

if (eng>asu){
System.out.println("Australia");
}else if(asu>eng){
System.out.println("England");
}else {
System.out.println("Tie");
}
}
}

No comments:

Post a Comment