Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- // TODO code application logic here
- Scanner input = new Scanner(System.in);
- System.out.println("Insert the 4 values in the same line");
- String firstTeam;
- firstTeam = input.next();
- String secondTeam;
- secondTeam = input.next();
- int Score1;
- Score1 = input.nextInt();
- int Score2;
- Score2 = input.nextInt();
- if (Score1 > Score2)
- System.out.println(firstTeam + "is the winning team");
- else if (Score1 < Score2)
- System.out.println(secondTeam + "is the winning team");
- else System.out.println("The match was a draw");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement