SHARE
TWEET

Untitled

a guest Oct 19th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         int numerator1, numerator2, denominator1, denominator2;
  10.         Scanner in = new Scanner(System.in);
  11.         numerator1 = in.nextInt();
  12.         numerator2 = in.nextInt();
  13.         denominator1 = in.nextInt();
  14.         denominator2 = in.nextInt();
  15.         int result1 = numerator1/denominator1;
  16.         int result2 = numerator2/denominator2;
  17.  
  18.         if ( result1 < result2 ){
  19.             System.out.println("-1");
  20.         }
  21.         else if ( result1 > result2 ){
  22.             System.out.println("1");
  23.         }
  24.         else System.out.println("0");
  25.  
  26.  
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top