Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Highest
- {
- static Scanner input = new Scanner( System.in );
- public static void main( String args[] )
- {
- System.out.print( "Number 1: " );
- // Convert String to integer
- int a = Integer.parseInt( input.nextLine() );
- System.out.print( "Number 2: " );
- // Convert String to integer
- int b = Integer.parseInt( input.nextLine() );
- // Look what number is the highest
- int highest = a < b ? b : a;
- System.out.println( "Highest number is: " + highest );
- }
- }
Add Comment
Please, Sign In to add comment