write a flowchart to input two numbers and display the smallest,
NO SPAM!
Answers
Answered by
1
Answer:
import java.util.Scanner;
public class Largest
{
public static void main(String[] args)
{
int numberOne, numberTwo, largest;
Scanner scan = new Scanner(System.in);
System.out.print("Enter the First Number: ");
numberOne = scan.nextInt();
System.out.print("Enter the Second Number: ");
numberTwo = scan.nextInt();
if(numberOne>numberTwo)
largest = numberOne;
else
largest = numberTwo;
System.out.println("\nLargest = " +largest);
}
}
Explanation:
Similar questions