Skip to content

Instantly share code, notes, and snippets.

@hiyorineko
Created September 19, 2013 15:12
Show Gist options
  • Save hiyorineko/6624986 to your computer and use it in GitHub Desktop.
Save hiyorineko/6624986 to your computer and use it in GitHub Desktop.
さっき作った最大だけ出すやつ
class Hikaku5{
public static void main(String[] a){
int A = 3;
int B = 10;
int C = 6;
int D = 15;
int E = 22;
if(A>B && A>C && A>D && A>E){
System.out.println("最大は"+A);
}else{
if(B>C && B>D && B>E){
System.out.println("最大は"+B);
}else{
if(C>D && C>E){
System.out.println("最大は"+C);
}else{
if(D>E){
System.out.println("最大は"+D);
}else{
System.out.println("最大は"+E);
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment