bouchnina

exercice 1

Dec 6th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include<stdio.h>
  2. float MOYENNE(float a,float b);
  3. int main()
  4. {
  5. float a,b,res;
  6. printf("Entrez deux nombres :");
  7. scanf("%f %f",&a,&b);
  8. res=MOYENNE(a,b);
  9. printf("la moyenne de %f et %f est : %.2f",a,b,res);
  10.  
  11. }
  12. float MOYENNE(float a,float b)
  13. {
  14. float res;
  15. res=(a+b)/2;
  16. return res;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment