public class Solution {
    public static void main(String[] args) {
        Scanner ip = new Scanner(System.in);
        System.out.print("Enter A: ");
        int a = ip.nextInt();
        System.out.print("Enter B: ");
        int b = ip.nextInt();
        System.out.print("Enter C: ");
        int c = ip.nextInt();
        int great = a >= b ? (a >= c ? a : c) : (b >= c ? b : c);
        System.out.println("Greatest among three numbers is: " + great);
        ip.close();
    }
}



OUTPUT:
Enter A: 1
Enter B: 2
Enter C: 3
Greatest among three numbers is: 3

 

相关文章:

  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-08-16
  • 2021-07-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-05-16
  • 2021-11-04
  • 2022-12-23
相关资源
相似解决方案