Dosyadan Okumak
#include < stdio.h >
#include < conio.h >
int main() {
FILE *file;
float numbers1,numbers2;
int i,j;
file = fopen("deneme.txt", "r");
if(file==NULL) {
printf("hata : dosya acilamadi!n");
return 1;
}
else {
printf("Dosya Acildi.n");
i = 0 ;
while(!feof(file)) {
fscanf(file, "%f %f", &numbers1, &numbers2);
printf("%f %fn", numbers1, numbers2);
i=i+2;
}
fclose(file);
getch();
return 0;
}
}
deneme.txt
0.00 0.00
3.00 5.00
6.00 10.00
9.00 15.00
12.00 20.00
0 yorum yazılmıştır