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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
#include<stdio.h>
#include<conio.h>
#define F1 59
#define F2 60
#define F3 61
#define F4 62
#define nmax 100
struct edudiant {
int matricule;
char nom[100],prenom[100],classe[5];
};
struct matiere {
int matricule;
char nom[100],prenom[100],classe[5];
};
void main()
{
struct etudiant etudiant[nmax];
char c;
int i,j,modifie,cherche;
clrscr();
gotoxy(22,2);printf("GESTION DE BULLETINS DE NOTES");
gotoxy(25,12);printf("<1>GESTION DES ETUDIANTS");
gotoxy(25,14);printf("<2>GESTION DES MATIERES");
gotoxy(25,16);printf("<3>SAISIE DE BULLETINS DE NOTES");
gotoxy(25,18);printf("<4>EDITION DE BULLETINS DE NOTES");
gotoxy(25,20);printf("<ESC>QUITTER");
gotoxy(25,22);printf("VOTRE CHOIX: ");
c=getch();
switch (c)
{
case '1':
{
clrscr();
printf("\n Matricule : ");
scanf("%d",&etudiant[i].matricule);
printf("\n Nom : ");
gets(etudiant[i].nom);
printf("\n Prenom : ");
gets(etudiant[i].prenom);
printf("\n Classe : ");
gets(etudiant[i].classe);
i++;
printf("\n Etudiant Ajoute !\n");
getch();
clrscr();
}
case F2 :
{
clrscr();
printf("Donnez le matricule : ");
scanf("%d",&cherche);
for (j=0;j<i;j++)
{
if (cherche==etudiant[j].matricule)
printf("Nom : %s\nPrenom : %s\nClasse : %s\n",etudiant[j].nom,etudiant[j].prenom,etudiant[j].classe);
else
printf("Erreur");
}
getch();
clrscr();
}
break;
case F3 :
{
clrscr();
printf("Donner le matricule : ");
scanf("%d",&modifie);
for (j=0;j<i;j++)
{
if (modifie==etud[j].matricule)
{
printf("\nNom : ");
scanf("%s",etudiant[j].nom);
printf("\nPrenom : ");
scanf("%s",etudiant[j].prenom);
printf("\n Classe : ");
gets(etudiant[j].classe);
printf("Modifie !\n");
}
else
printf("Erreur");
}
getch();
clrscr();
break;
{
case '2':
{
clrscr();
printf("\n Code de matiére : ");
scanf("%d",&matiere[i].Code de matiére);
printf("\n Nom de la matiere: ");
gets(etudiant[i].nom de la matiere);
printf("\n Coefficient : ");
gets(etudiant[i].Coefficient);
printf("\n Unite d enseignement : ");
gets(etudiant[i].Unite d enseignement);
printf("\n Classe : ");
gets(etudiant[i].Classe);
i++;
printf("\n Matiere Ajoute !\n");
getch();
clrscr();
}
case F2 :
{
clrscr();
printf("Donnez le Code de matiere : ");
scanf("%d",&cherche);
for (j=0;j<i;j++)
{
if (cherche==matiere[j].matricule)
printf("nom de la matiere : %s\nCoefficient : %s\nUnite d enseignement :s\nClasse : %s\n",matiere[j].Nom de la matiere,matiere[j].coefficient,matiere[j].unite d enseignement,matiere[j].matiere);
else
printf("Erreur");
}
getch();
clrscr();
}
break;
case F3 :
{
clrscr();
printf("Donner le code d matiere : ");
scanf("%d",&modifie);
for (j=0;j<i;j++)
{
if (modifie==mat[j].code de matier)
{
printf("\nNom d matiere : ");
scanf("%s",etudiant[j].nom d matiere);
printf("\nCoefficient : ");
scanf("%s",etudiant[j].Coefficient);
printf("\n Uniter d enseignement : ");
gets(etudiant[j].Uniter d enseignement);
printf("\n Classe : ");
gets(etudiant[j].classe);
printf("Modifie !\n");
}
else
printf("Erreur");
}
getch();
clrscr();
break;
}
getch();
} |