Mise à jour du git
This commit is contained in:
BIN
APL1.2/Dev1.2/Fichiers/Challenger
Executable file
BIN
APL1.2/Dev1.2/Fichiers/Challenger
Executable file
Binary file not shown.
24
APL1.2/Dev1.2/Fichiers/Challenger.c
Normal file
24
APL1.2/Dev1.2/Fichiers/Challenger.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int main(int argc, char** argv) {
|
||||
int a,score;
|
||||
int tab[10];
|
||||
char nom [3];
|
||||
FILE* flux;
|
||||
FILE* flux2;
|
||||
flux = fopen("/export/home/an21/vieirae/APL/APL1.2/Dev1.2/Fichiers/top10", "r");
|
||||
flux2 = fopen("/export/home/an21/vieirae/APL/APL1.2/Dev1.2/Fichiers/top10", "w");
|
||||
|
||||
if (flux == NULL) {
|
||||
printf("accès au fichier impossible !");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
fwrite (("%09d %c",argc[2],argv),4, 1,flux2);
|
||||
for (int i = 0;i<11;i++){
|
||||
fread (&a,4,1,flux2);
|
||||
fread (&tab, 1, 3,flux2);
|
||||
printf ("%09d %s\n",a,tab);
|
||||
}
|
||||
fclose(flux);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
BIN
APL1.2/Dev1.2/Fichiers/Records
Executable file
BIN
APL1.2/Dev1.2/Fichiers/Records
Executable file
Binary file not shown.
21
APL1.2/Dev1.2/Fichiers/Records.c
Normal file
21
APL1.2/Dev1.2/Fichiers/Records.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int main() {
|
||||
int a;
|
||||
int tab[10];
|
||||
FILE* flux;
|
||||
flux = fopen("/export/home/an21/vieirae/APL/APL1.2/Dev1.2/Fichiers/top10", "r");
|
||||
|
||||
|
||||
if (flux == NULL) {
|
||||
printf("accès au fichier impossible !");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
for (int i = 0;i<10;i++){
|
||||
fread (&a,4,1,flux);
|
||||
fread (&tab, 1, 3,flux);
|
||||
printf ("\| %09d \| %s \|\n",a,tab);
|
||||
}
|
||||
fclose(flux);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
1
APL1.2/Dev1.2/Fichiers/top10
Normal file
1
APL1.2/Dev1.2/Fichiers/top10
Normal file
@@ -0,0 +1 @@
|
||||
v<08>
|
Reference in New Issue
Block a user