fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. float num1,num2,num3;
  5. scanf("%f %f %f", &num1, &num2, &num3);
  6. if ((num1 >= num2) && (num1 >= num3)){
  7. printf("%.2f is the greatest number.\n", num1);
  8. }else if((num2 >= num1) && (num2 >= num3)){
  9. printf("%.2f is the greatest number.\n", num2);
  10. }else{
  11. printf("%.2f is the greatest number.\n", num3);
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0.01s 5280KB
stdin
10
20
10
stdout
20.00 is the greatest number.