Skip to content

Instantly share code, notes, and snippets.

@hajipy
Forked from anonymous/hikaku
Last active December 23, 2015 10:49
Show Gist options
  • Save hajipy/6624469 to your computer and use it in GitHub Desktop.
Save hajipy/6624469 to your computer and use it in GitHub Desktop.
class Hikaku{
public static void main(String[] a){
int A = 2;
int B = 10;
int C = 6;
if(A>B && A>C){
if(B>C){
System.out.println("最大が"+A+"、次点が"+B);
}else{
System.out.println("最大が"+A+"、次点が"+C);
}else{
if(B>C && B>A){
if(A>C){
System.out.println("最大が"+B+"、次点が"+A);
}else{
System.out.println("最大が"+B+"、次点が"+C);
}
else{
if(A>B){
System.out.println("最大が"+C+"、次点が"+A);
}else{
System.out.println("最大が"+C+"、次点が"+B);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment