Computer Science, asked by shrabonibiswas1978, 6 days ago

write a program in java to input 3 integers and print the maximum of 3 numbers

Answers

Answered by poonamanil84
1

Explanation:

import java.util.Scanner;

public class KboatGreatestNumber

{

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

System.out.print("Enter First Number: ");

int a = in.nextInt();

System.out.print("Enter Second Number: ");

int b = in.nextInt();

System.out.print("Enter Third Number: ");

int c = in.nextInt();

int g = Math.max(a, b);

g = Math.max(g, c);

System.out.println("Greatest Number = " + g);

}

OUTPUT

Enter the first number : 15

Enter the Second number : 20

Enter the Third number : 10

Greatest number = 20

please mark me brainliest

Similar questions