hey mate
● pass any 3 integer number as a parameter and print the biggest (java class 9th icse program )
#AARCHI111
Aarchi111:
nahi
Answers
Answered by
1
class number
{
public static void main (int a, int b, int c)
{
if (a> b && a> c)
{
int temp=a;
}
elseif (b>a && b>c)
{
temp=b;
}
elseif ( c>a && c>b)
{
temp=c;
}
System.out.println("Biggest number is:"+temp);
}
}
HOPE YOU UNDERSTOOD MY ANSWER FRIEND! IF YOU DIDN'T THEN COMMENT BELOW!
{
public static void main (int a, int b, int c)
{
if (a> b && a> c)
{
int temp=a;
}
elseif (b>a && b>c)
{
temp=b;
}
elseif ( c>a && c>b)
{
temp=c;
}
System.out.println("Biggest number is:"+temp);
}
}
HOPE YOU UNDERSTOOD MY ANSWER FRIEND! IF YOU DIDN'T THEN COMMENT BELOW!
Answered by
0
import java.util.*;
class Biggest
{
public static void main(String args[])
{
scanner in=new scanner(System.in);
int a,b,c,max=0,min=0;
a=in.nextInt();
b=in.nextInt();
c=in.nextInt();
min=Math.max(a,b);
max=Math.max(min,c);
System.out.println(" "+max);
}
}
class Biggest
{
public static void main(String args[])
{
scanner in=new scanner(System.in);
int a,b,c,max=0,min=0;
a=in.nextInt();
b=in.nextInt();
c=in.nextInt();
min=Math.max(a,b);
max=Math.max(min,c);
System.out.println(" "+max);
}
}
Similar questions