Unnamed
public text v1 · immutable#include <stdio.h>
#include <stdlib.h>
int main()
{
int nb_note, note_ind=1;
float tab[note_ind];
float somme=0, moy=0;
printf("ce programme va calculer la moyenne d'un eleve\n");
printf("nombre de note a saisir?\n");
scanf("%d",&nb_note);
do
{
printf("n(%d)",note_ind);
scanf("%f",&tab[note_ind]);
somme = somme + tab[note_ind];
note_ind++;
}
while (note_ind<nb_note+1);
moy = somme / nb_note;
printf("la moyenne de l'eleve est %0.2f\n",moy);
system("PAUSE");
return 0;
}