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
| #include <stdio.h>
#include <stdlib.h>
#include <conio.h>
void tri(int* TABA,int N);
char chaine[20] = "";
int main()
{
char FICH_A[30], FICH_FUS[30];
FILE *FA,*FFUS;
int valeur,pos,l;
int cap_max=150;
int cap_res;
int TABA[100],TFUS[200],obj_bin[100][2],tab[100][2],tab_val[100][2],bin_capres[100][2];
int LA,N,I,val,j=0,k ,SOMME,OBJET,i=0,R=0,bin,bin1,diff=0,BI,s;
FA = fopen("C:\\tester.txt", "r");
if (!FA)
{
printf("\aERREUR: Impossible d'ouvrir "
"le fichier: ");
}
else
{
for (LA=0; !feof(FA); LA++)
{
int tempValue ;
fscanf(FA,"%d", &tempValue);
TABA[LA]=tempValue;
tab[LA][0]=LA;
tab[LA][1]=tempValue;
printf("%d\n",TABA[LA]);
/* printf(" %d %d\n",tab[LA][0],tab[LA][1]);*/
}
fclose(FA);
}
getch();
} |
Partager