24 lines
398 B
C
24 lines
398 B
C
#include <stdio.h>
|
|
|
|
int main () {
|
|
|
|
float a = 1.;
|
|
int b = 1 ;
|
|
|
|
FILE *point = fopen("data.dat","r"); // ouverture file "r" lecture
|
|
|
|
// test necessaire pour ouverture en lecture
|
|
if(point==NULL) {
|
|
puts("Echec de l'ouverture. Fin du programme.");
|
|
return 0;
|
|
}
|
|
|
|
|
|
fscanf(point,"%f %d \n",&a,&b); // lecture file
|
|
|
|
printf("%f %d \n",a,b); // print
|
|
|
|
fclose(point); // fermeture file
|
|
|
|
}
|