Computer Science, asked by dg2849183, 7 months ago

WRITE A PROGRAM TO TAKE THREE NUMBERS AS INPUT AND FIND OUT WHICH IS THE LARGEST USING SCANNER ​

Answers

Answered by AjayKumarr676
9

import java.util.*;

public class Scanner

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

int a,b,c,d;

System.out.println("Enter the three numbers");

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

d=Math.max(a,b,c);

System.out.println("The largest number is="+d);

}

}

Similar questions