Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.telerikacademy.oop;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String x = in.nextLine();
- String y = in.nextLine();
- String z = in.nextLine();
- double xd = Double.parseDouble(x);
- double yd = Double.parseDouble(y);
- double zd = Double.parseDouble(z);
- if (xd >= yd && xd >= zd) {
- System.out.println(x);
- } else if (yd >= xd && yd >= zd) {
- System.out.println(y);
- } else {
- System.out.println(z);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement