Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 01.05.2021
- import java.util.Scanner;
- public class Ex07 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- // 5, 7 , 12 --> 12
- // 8, 4, 6 --> 8
- int a, b, c;
- Scanner in = new Scanner(System.in);
- System.out.print("Enter three numbers: ");
- a = in.nextInt();
- b = in.nextInt();
- c = in.nextInt();
- if (a > c && a > b) {
- System.out.println("the great number is " + a);
- } else {
- if (b > c && b > a) {
- System.out.println("the great number is " + b);
- } else {
- System.out.println("the great number is " + c);
- }
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement