Advertisement
jwrbg

асд

Mar 9th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. package ProgrammingBasics;
  2.  
  3. import java.util.Arrays;
  4. import java.util.Scanner;
  5.  
  6. public class AAA {
  7.     public static void main(String[] args) {
  8.     Scanner scanner = new Scanner(System.in);
  9.     String result=scanner.nextLine();
  10.     char goalsTeamOne=result.charAt(0);
  11.     char goalsTeamTwo=result.charAt(result.length()-1);
  12.        
  13.     int countWin=0;
  14.     int countDraw=0;
  15.     int countLoose=0;
  16.     if(goalsTeamOne>goalsTeamTwo){
  17.         countWin++;
  18.        
  19.     }else if(goalsTeamOne==goalsTeamTwo){
  20.         countDraw++;
  21.     }else if(goalsTeamOne<goalsTeamTwo){
  22.         countLoose++;
  23.     }
  24.     }
  25.  
  26.  
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement