// fscanfnums.c -- 使用fscanf()函数从磁盘文件读取格式化数据#include#include int main(void){ float f1,f2,f3,f4,f5; FILE *fp; if((fp = fopen("my first file.txt", "r")) == NULL){ fprintf(stderr, "Error opening file.\n"); exit(1); } fscanf(fp, "%f %f %f %f %f", &f1, &f2, &f3, &f4, &f5); printf("The values are %f, %f, %f, %f and %f.\n", f1, f2, f3, f4, f5); fclose(fp); return 0;}