All pastes #735305 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-13 14:24 UTC
rendered paste body
#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;
}