Tag: Next can string returns double height condition str sys
/*system.out.println ("Please enter three numbers:");//Enter three digits to return the largest one.
int a,b,c,big;
Scanner d = new Scanner (system.in);
A = D.nextint ();
b = D.nextint ();
c = D.nextint ();
if (a>b)
{
Big=a;
if (big<c)
{
Big = C;
}
}
Else
{
Big=b;
if (big<c)
{
Big = C;
}
}
System.out.println (big); */
/*
SYSTEM.OUT.PRINTLN ("Please input three coefficients of the two-second equation");//One-yuan two-time equation root condition
Double a,b,c,d;
Scanner sc = new Scanner (system.in);
A = Sc.nextdouble ();
b = sc.nextdouble ();
c = sc.nextdouble ();
D = b*b-4*a*c;
if (a==0)
{
System.out.println ("This is not a unary two-time equation");
}
Else
{
if (d>0)
{
System.out.println ("Equation has two real roots");
}
else if (d==0)
{
System.out.println ("Equation has two equal real roots");
}
Else
{
System.out.println ("The equation has no real roots");
}
}
*/
/*system.out.println ("Please enter a year");//Enter a year to see if it is a leap years
Scanner sc = new Scanner (system.in);
int year = Sc.nextint ();
if (year%4 = = 0 && year%100! = 0 | | year%400 = = 0)
{
System.out.println (year+ "is a leap year");
}
Else
{
System.out.println (year+ "Not a leap year");
}
*/
/*SYSTEM.OUT.PRINTLN ("Input Gender: Height: Weight:");//Determine whether the figure is standard
Scanner sc = new Scanner (system.in);
String sex = Sc.nextline ();
Double height = sc.nextdouble ();
Double weight = sc.nextdouble ();
Double Biao;
if (Sex.equals ("male"))
{
Biao = height-100;
if (biao-3{
System.out.println ("good");
}
else if (biao-3>height)
{
System.out.println ("thin");
}
Else
{
System.out.println ("fat");
}
}
else if (sex.equals ("female"))
{
Biao = height-110;
if (biao-3{
System.out.println ("good");
}
else if (biao-3>height)
{
System.out.println ("thin");
}
Else
{
System.out.println ("fat");
}
}
*/
Java Conditional Statement Practice