Type Here to Get Search Results !

Find Largest Number Between Two Numbers From User Input

0

Find Largest Number Between Two Numbers From User Input 

import java.util.Scanner;
public class Fromtwo
{
    public static void main(String args[])
    {
        int a, b, big;
        Scanner scan = new Scanner(System.in);
        System.out.print("Enter Two Number : ");
        a = scan.nextInt();
        b = scan.nextInt();
        if(a>b)
        {
            big = a;
        }
        else
        {
            big = b;
        }
        System.out.print("Largest of Two Number is " +big);
    }
}


Post a Comment

0 Comments

Recent-post