1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
struct Etudiant
{
char nom [31];
char prenom [31];
float notes [10];
};
void afficher()
{
int nom,prenom,notes [10]
printf("Nom :%s \n",nom);
printf("Prenom :%f \n",prenom);
printf("Notes :s% \n",notes [i]);
}
void lire()
{
int nom, prenom,i, notes [10];
printf("Donnez le nom de l'étudiant:\n");
scanf("%s",nom);
printf("Donnez le prenom de l'etudiant:\n");
scanf("%s",prenom);
printf("Donnez les dix notes de l'etudiant:\n");
scanf("%f",notes[i]);
}
void tri ()
{
int t[10],i,j,x,min,max;
for (i=0;i<9;i++)
{
indice =i;
min = t[i]
for (j=i+1;j<10;j++)
if(t[i]<min)
{
indice=j;
min=t[j];
}
x=t[i]
t[i]=t[indice]
t[indice]=xi
}
} |
Partager