Computer Science, asked by kushal11146, 1 year ago

Write a Program to Input Three Number and Find the Maximum No. using Math.max.

Answers

Answered by Incredible29
6
Heya Friend ,
Here is your answer !!

import java.util.*;
public class Max
{
public static void main ( String args [] )
{
Scanner in = new Scanner ( System.in );
System.out.println ( " Enter 3 no. : " ) ;
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
int M = ( int ) Math.max ( a , ( Math.max ( b , c ) ) ;
System.out.println ( " The maximum among these three is : " + M ) ;
}
}

Hope it helps you !!

Incredible29: plz follow if u lyk my answer
Similar questions