58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
#include <iostream>
|
|
|
|
#include "fonction.h"
|
|
|
|
using namespace std;
|
|
|
|
// int saisiePromo(
|
|
// struct Etudiant promo[],
|
|
// unsigned int taille_relle)
|
|
// {
|
|
// unsigned int i = 0;
|
|
|
|
// do
|
|
// {
|
|
// char nom[21];
|
|
// char prenom[21];
|
|
// float moyenne_generale;
|
|
// unsigned int scolarisation;
|
|
|
|
// cout << "Saisissez le nom de l'étudiant" << endl;
|
|
// cin >> nom;
|
|
// cout << "Saisissez le prenom de l'étudiant" << endl;
|
|
// cin >> prenom;
|
|
// cout << "Saisissez la moyenne de l'étudiant" << endl;
|
|
// cin >> moyenne_generale;
|
|
// cout << "Saisissez la scolarisation de l'étudiant" << endl;
|
|
// cin >> scolarisation;
|
|
|
|
// if (
|
|
// moyenne_generale >= 0 and moyenne_generale <= 20
|
|
// and scolarisation <= 1
|
|
// ) {
|
|
// promo[i] = {nom, prenom, moyenne_generale, scolarisation};
|
|
// i++;
|
|
// }
|
|
// }
|
|
|
|
// return i+1;
|
|
// }
|
|
|
|
unsigned int filtreDemission(
|
|
struct Etudiant promo[],
|
|
const unsigned int taille_pratique
|
|
) {
|
|
unsigned int decompte = taille_pratique;
|
|
struct Etudiant temporaire;
|
|
|
|
// Tri par selection...
|
|
for (unsigned int j = 0; j < taille_pratique-1; j++) {
|
|
for (unsigned int i = 0; i < taille_pratique-1; i++)
|
|
if (promo[i].scolarisation == 0) {
|
|
temporaire = promo[i];
|
|
promo[i] = promo[i+1];
|
|
promo[i+1] = temporaire;
|
|
}
|
|
}
|
|
}
|