fp=fopen("d:\\jrzh\\example\\c1.txt","rt");fscanf(fp,"%d ,%d",i,t);//从fp开始依次读取存到变量i,t中。fprintf(fp,"%d",n);//将变量n写在fp处。