拉丁的传说
运行前在C盘 的根目录下建立一个data.txt的文件#include <stdio.h>int main(){FILE *f;int i[10], j, m = 0, n = 0;f = fopen("c:/data.txt", "r");if(f == NULL){printf("open file error!");return 0;}for(j = 0; j < 10; j++){fscanf(f, "%d", i + j);}for(j = 1, m = i[0], n = i[0]; j < 10 - 1; j++){if(m < i[j])m = i[j];if(n > i[j])n = i[j];}printf("%d %d", m, n);return 0;}