Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class numberSort {
- public static void main(String args[]) {
- Scanner scanner = new Scanner(System.in);
- int m, y, k;
- System.out.print("Enter First Number: ");
- m = scanner.nextInt();
- System.out.print("Enter Second Number: ");
- y = scanner.nextInt();
- System.out.print("Enter Third Number: ");
- k = scanner.nextInt();
- // m = 57;
- // y = 46;
- // k = 100;
- int j = 0;
- if ((m > y) && (m > k)) {
- j = m;
- }else if ((y > m) && (y > k)) {
- j = y;
- } else {
- j = k;
- }
- System.out.println("Largest: " + j);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement