2020-12-13 14:41:38 +01:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
#define FILENAME "input"
|
2020-12-14 01:18:07 +01:00
|
|
|
|
//#define FILENAME "test"
|
2020-12-13 14:41:38 +01:00
|
|
|
|
|
2020-12-14 01:18:07 +01:00
|
|
|
|
void prem_partie(FILE *ptr);
|
|
|
|
|
void deux_partie(FILE *ptr);
|
2020-12-13 14:41:38 +01:00
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
FILE *ptr = fopen(FILENAME, "r");
|
|
|
|
|
if (ptr == NULL)
|
|
|
|
|
{
|
|
|
|
|
printf("Le fichier %s n’existe pas.\n", FILENAME);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printf("Traitement de la première partie…\n");
|
2020-12-14 01:18:07 +01:00
|
|
|
|
prem_partie(ptr);
|
2020-12-13 14:41:38 +01:00
|
|
|
|
fseek(ptr, 0, SEEK_SET);
|
|
|
|
|
printf("\nTraitement de la deuxième partie…\n");
|
2020-12-14 01:18:07 +01:00
|
|
|
|
deux_partie(ptr);
|
2020-12-13 14:41:38 +01:00
|
|
|
|
|
|
|
|
|
fclose(ptr);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|