22 lines
370 B
C
22 lines
370 B
C
#include <stdio.h>
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
|
|
int main() {
|
|
FILE * fin = fopen("a.txt","r");
|
|
int fout = open("test",O_CREAT|O_WRONLY);
|
|
|
|
float c,x;
|
|
int n;
|
|
|
|
while(fscanf(fin, "%f %f %d\n", &c, &x, &n) == 3) {
|
|
write(fout,&c,sizeof(float));
|
|
write(fout,&x,sizeof(float));
|
|
write(fout,&n,sizeof(int));
|
|
puts("ed uno");
|
|
}
|
|
|
|
fclose(fin);
|
|
close(fout);
|
|
}
|