Advertisement
nguyenhappy92

Tìm số lớn nhất trong ba số thực a, b và c

Oct 6th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // Tim so lon nhat ba so thuc a, b,c
  2. // Khai bao thu vien
  3. #include<stdio.h>
  4. #include<conio.h>
  5.  
  6. float max(float a, float b)
  7. {
  8.  
  9. if(a>b)
  10. {
  11. return a;
  12. }
  13. else
  14. {
  15. return b;
  16. }
  17. }
  18. void main()
  19. {
  20. float a,b,c;
  21. scanf("%f%f%f",&a,&b,&c);
  22. printf("%.4f",max(a,max(b,c)));
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement