Previous Next Up Index Contents

Exercice 10.6

#include <stdio.h>

main()
{
 /* Prototypes des fonctions appelées */
 float MOYENNE(float X, float Y);
 /* Variables locales */
 float A,B;
 /* Traitements */
 printf("Introduire deux nombres : ");
 scanf("%f %f", &A, &B);
 printf("La moyenne arithmétique de %.2f et %.2f est %.4f\n",
                                           A, B, MOYENNE(A,B));
 return 0;
}

float MOYENNE(float X, float Y)
{
 return (X+Y)/2;
}


Previous Next Up Index Contents

Feedback - Copyright © 1993,1996,1997 F.Faber