marinjordanov

Biggest of Three

Sep 17th, 2021
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class BiggestOfThree {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. double a = Double.parseDouble(scanner.nextLine());
  7. double b = Double.parseDouble(scanner.nextLine());
  8. double c = Double.parseDouble(scanner.nextLine());
  9.  
  10. if (a >= -200 & a <= 200 & b >= -200 & b <= 200 & c >= -200 & c <= 200) {
  11. if (a >= b & a >= c) {
  12. System.out.printf("%.0f",a);
  13. } else System.out.printf("%.0f",Math.max(b, c));
  14. }
  15.  
  16. }
  17. }
RAW Paste Data