コード例 #1
0
ファイル: main.c プロジェクト: Psykoangel/c_projects_repo
int main() {
  // tableau des notes des �l�ves
  int tab_notes[16] = {10, 12, 8, 20, 19, 6, 12, 9,
                       13, 11, 7, 16, 13, 7, 14, 16};

  printf("moyenne : %.4f \n", calculer_moyenne(tab_notes, 16));
  system("pause");
  return 0;
}
コード例 #2
0
ファイル: classe.c プロジェクト: nbyouri/c
void trier_par_moyenne(classe * c) {
    int i = 0;
    for (i = 0; i < c->nb; i++)
        calculer_moyenne(&c->tab[i]);
    qsort(c->tab, (unsigned int)c->nb, sizeof(c->tab[0]), comparer_moyennes);
}