fork(1) download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. float a, b, c;
  5. printf("Enter three numbers: ");
  6. scanf("%f %f %f", &a, &b, &c);
  7. if (a>=b)
  8. {
  9. if(a>=c)
  10. printf("Largest number = %.2f",a);
  11. else
  12. printf("Largest number = %.2f",c);
  13. }
  14.  
  15. else
  16. {
  17. if(b>=c)
  18. printf("Largest number = %.2f",b);
  19. else printf("Largest number = %.2f",c);
  20. }
  21. return 0;
  22. }
Success #stdin #stdout 0s 2252KB
stdin
3 5 1
stdout
Enter three numbers: Largest number = 5.00