Merge branch 'master' of https://codefirst.iut.uca.fr/git/antoine.perederii/saeAlgo
commit
7c33b3c693
@ -1,2 +1,10 @@
|
|||||||
Date nbActivitesJour
|
Date nbActivitesJour
|
||||||
13052022 120
|
12082022 500
|
||||||
|
5092022 525
|
||||||
|
7092022 740
|
||||||
|
8092022 812
|
||||||
|
9092022 850
|
||||||
|
10092022 620
|
||||||
|
11092022 601
|
||||||
|
12092022 422
|
||||||
|
13092022 501
|
||||||
|
@ -1 +1,10 @@
|
|||||||
Ncarte age pointsCarte carteActive
|
Ncarte age pointsCarte carteActive
|
||||||
|
1 22 10 0
|
||||||
|
2 25 5 1
|
||||||
|
3 47 7 1
|
||||||
|
4 38 8 1
|
||||||
|
5 18 8 1
|
||||||
|
6 46 6 1
|
||||||
|
7 36 6 0
|
||||||
|
8 19 2 1
|
||||||
|
9 21 1 1
|
||||||
|
@ -1,19 +1,27 @@
|
|||||||
#include "SAE.h"
|
#include "SAE.h"
|
||||||
|
|
||||||
void testOuverture()
|
void testOuverture(void)
|
||||||
{
|
{
|
||||||
int tNoCarte[500], tage[500], tPointsCarte[500], tCarteActive[500];
|
int tNoCarte[500] = {0}, tage[500] = {0}, tPointsCarte[500] = {0}, tCarteActive[500] = {0};
|
||||||
int tDate[500], tNbActivitesJour[500];
|
int tDate[500] = {0}, tNbActivitesJour[500] = {0};
|
||||||
int tmax = 500, pas, i;
|
int tmax = 500, pas, i;
|
||||||
pas = Ouverture(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, &tmax);
|
pas = Ouverture(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, tmax);
|
||||||
printf("Pas: %d", &pas);
|
printf("Pas: %d", &pas);
|
||||||
printf("Ncarte nom prenom age pointsCarte carteActive nbActivitesJour\n");
|
printf("Ncarte age pointsCarte carteActive nbActivitesJour Date taillemax\n");
|
||||||
for(i=0; i < pas; i++)
|
for(i=0; i < pas; i++)
|
||||||
printf("\t%d\t%d\t%d\t%d\t%d\t%d\n", tNoCarte[i], tage[i], tPointsCarte[i], tCarteActive[i], tNbActivitesJour[i], tDate[i], &tmax);
|
printf("\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", tNoCarte[i], tage[i], tPointsCarte[i], tCarteActive[i], tNbActivitesJour[i], tDate[i], &tmax);
|
||||||
|
}
|
||||||
|
|
||||||
|
void testSauvegarde(void)
|
||||||
|
{
|
||||||
|
int tNoCarte[500] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, tage[500] = {22, 25, 47, 38, 18, 46, 36, 19, 21, 30}, tPointsCarte[500] = {10, 5, 7, 8, 8, 6, 6, 2, 1, 4}, tCarteActive[500] = {0, 1, 1, 1, 1, 1, 0, 1, 1, 1};
|
||||||
|
int tDate[500] = {12082022, 5092022, 7092022, 8092022, 9092022, 10092022, 11092022, 12092022, 13092022, 14092022}, tNbActivitesJour[500] = {500, 525, 740, 812, 850, 620, 601, 422, 501, 520};
|
||||||
|
Sauvegarde(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
testOuverture();
|
//testOuverture();
|
||||||
|
testSauvegarde();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in new issue