ofekkfir

going up

Nov 26th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. import java.util.*;
  2. public class Sederoleee
  3. {
  4.     static Scanner reader = new Scanner (System.in);
  5.  
  6.     /**
  7.      * @param args
  8.      */
  9.     public static void main(String[] args)
  10.     {
  11.        
  12.         int i = 0;
  13.         int count = 0;
  14.         while (i<=7)
  15.         {
  16.             int input = reader.nextInt();
  17.             int input1 = reader.nextInt();
  18.             if (input > input1)
  19.             {
  20.                 count++;
  21.             }
  22.             input = input1;
  23.             i++;
  24.         }
  25.        
  26.         System.out.println (count);
  27.            
  28.            
  29.            
  30.            
  31.         }
  32.        
  33.     }
Advertisement
Add Comment
Please, Sign In to add comment