Advertisement
marinjordanov

BiggestOfThree

Sep 17th, 2021
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  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.println(a);
  13. }
  14. else if (b>=c) {
  15. System.out.println(b);
  16. }
  17. else {
  18. System.out.println(c);
  19. }
  20. }
  21.  
  22. }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement