Skip to content

Instantly share code, notes, and snippets.

@RossignolVincent
Last active January 24, 2017 14:52
Show Gist options
  • Save RossignolVincent/fa528dc727319fedc1cee3bd9992c1c4 to your computer and use it in GitHub Desktop.
Save RossignolVincent/fa528dc727319fedc1cee3bd9992c1c4 to your computer and use it in GitHub Desktop.
float a = (float) 0.00;
float b = (float) 0.00;
float c = (float) 0.00;
for(; a < 65.52; a+=0.01){
for(; b < 65.52; b+=0.01){
for(; c < 65.52; c+=0.01){
if(a+b+c == 65.52 && a*b*c == 65.52){
System.out.println(a+", "+b+", "+c);
break;
}
}
}
}
// Results : a = 0.52, b = 2 and c = 63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment