Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include<stdio.h>
  2. main()
  3. {
  4. printf("--------------------------\n");
  5. printf("Max de 3 nombres\n");
  6. printf("--------------------------\n");
  7. printf("\n");
  8. float a,b,c, m,max;
  9.  
  10. printf("Entrez le premier nombre: ");
  11. scanf("%f",&a);
  12. printf("Entrez le deuxième nombre: ");
  13. scanf("%f",&b);
  14. printf("Entrez le troisième nombre: ");
  15. scanf("%f",&c);
  16.  
  17. if (a > b) {
  18. m = a ;
  19. } else {
  20. m = b ;
  21. }
  22.  
  23. if (m > c) {
  24. max = m ;
  25. } else {
  26. max = c ;
  27. }
  28.  
  29. printf("\n");
  30. printf("\n");
  31. printf("Le Maximum est: %f", max);
  32. printf("\n");
  33. printf("\n");
  34. system("pause");
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement