write a program to find Max and min values in three given numbers in ABC when a=5,b=6,c=9
Answers
Answered by
2
Answer:
public class MAX_MIN
{
public static void main(String args[])
{
int a=5;
int b=6;
int c=9;
int d=Math.max(a,b);
int e=Math.max(d,e);
System.out.println("Maximum number:"+e);
int f=Math.min(a,b);
int g=Math.min(f,c);
System.out.println("Minimum Number:"+g);
}
}
Hope it helps. Happy to help u.
Explanation:
Similar questions