Computer Science, asked by hhhhyyrfft, 1 year ago

Write a program in java to input three numbers and find the greatest number among them.

Answers

Answered by Anonymous
3

import java.util.*;

public class Number

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

int a,b,c,d,e;

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

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

d= Math.max(a,b);

e= Math.max(d,c);

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

}

}

Answered by gracy55
0

Answer:

Parameters used in First Java Program

Let's see what is the meaning of class, public, static, void, main, String[], System.out.println(). class keyword is used to declare a class in java. public keyword is an access modifier which represents visibility. ... main represents the starting point of the program.

Similar questions