Advertisement
jwrbg

асд

Mar 9th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 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.    
  10.  
  11.     int countWin=0;
  12.     int countDraw=0;
  13.     int countLoose=0;
  14.  
  15.         for (int i = 0; i <3 ; i++) {
  16.             String result=scanner.nextLine();
  17.             char goalsTeamOne=result.charAt(0);
  18.             char goalsTeamTwo=result.charAt(result.length()-1);
  19.            
  20.        
  21.     if(goalsTeamOne>goalsTeamTwo){
  22.         countWin++;
  23.  
  24.     }else if(goalsTeamOne==goalsTeamTwo){
  25.         countDraw++;
  26.     }else if(goalsTeamOne<goalsTeamTwo) {
  27.         countLoose++;
  28.     }
  29.     }
  30.     }
  31.  
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement