。牐 if((fp = fopen("in.dat", "r")) == NULL) return 1 ;
while(!feof(fp)) {
。牐 fscanf(fp, "%d,", &xx[i++]) ;
。牐 }
。牐 fclose(fp) ;
。牐 return 0 ;
。牐爙
。牐
。牐爒oid WriteDat(void)
。牐爗
。牐 FILE *fp ;
。牐
。牐 fp = fopen("OUT1.DAT", "w") ;
fprintf(fp, "%d\n%d\n%.2lf\n", totNum, totCnt, totPjz) ;
。牐 fclose(fp) ;
。牐爙
===============================================================================
。牐犓钄(shù)據(jù) :
。牐===============================================================================
。牐燖2 IN.DAT 016
。牐6045,6192,1885,3580,8544,6826,5493,8415,3132,5841,
。牐6561,3173,9157,2895,2851,6082,5510,9610,5398,5273,
。牐3438,1800,6364,6892,9591,3120,8813,2106,5505,1085,
。牐5835,7295,6131,9405,6756,2413,6274,9262,5728,2650,
。牐6266,5285,7703,1353,1510,2350,4325,4392,7573,8204,
。牐7358,6365,3135,9903,3055,3219,3955,7313,6206,1631,
。牐5869,5893,4569,1251,2542,5740,2073,9805,1189,7550,
。牐4362,6214,5680,8753,8443,3636,4495,9643,3782,5556,
1018,9729,8588,2797,4321,4714,9658,8997,2080,5912,
。牐9968,5558,9311,7047,6138,7618,5448,1466,7075,2166,
4025,3572,9605,1291,6027,2358,1911,2747,7068,1716,
。牐9661,5849,3210,2554,8604,8010,7947,3685,2945,4224,
。牐7014,9058,6259,9503,1615,1060,7787,8983,3822,2471,
。牐5146,7066,1029,1777,7788,2941,3538,2912,3096,7421,
9175,6099,2930,4685,8465,8633,2628,7155,4307,9535,
。牐4274,2857,6829,6226,8268,9377,9415,9059,4872,6072,
。牐#E
。牐燖3 $OUT1.DAT 003
|160\|69\|5460.51
。牐#E
北京 | 天津 | 上海 | 江蘇 | 山東 |
安徽 | 浙江 | 江西 | 福建 | 深圳 |
廣東 | 河北 | 湖南 | 廣西 | 河南 |
海南 | 湖北 | 四川 | 重慶 | 云南 |
貴州 | 西藏 | 新疆 | 陜西 | 山西 |
寧夏 | 甘肅 | 青海 | 遼寧 | 吉林 |
黑龍江 | 內(nèi)蒙古 |