全文预览

C语言模拟9套

上传者:叶子黄了 |  格式:pdf  |  页数:137 |  大小:9005KB

文档介绍
etchO ;\ryzj()º\r)\rint fun(int array[N][M])\r(\r/ **********Prograiii**********/\r/********** End **********/\r)\ryzj()\r(\rFILE *IN, *OUT;\rint iIN[N] [M], iOUT, i, jº\rIN=fopen(¹in. dat¹A¹r¹)º.\rif(IN==NULL)\r{printf (""Please Verify The Currernt Dir.. It May Be Changed");\r)\rOUTfopen ("out. dat", "w");\rif(OUT==NULL)\r{printf (''Please Verify The Current Dir.. It May Be Changed");\r}\rfor(i=0;i<N;i++)\rfor (j=0;j<M;j++)\rfscanf (IN, "%d¹, &iIN[i] [j]);\riOUT=fun(iIN);\rfprintf (OUT, zA%d %d %d\n”, iOUT, Row, Col);\rfclose(IN);\rfclose(OUT);\r)\r\rint max, i, j;\rmax=array [0][0];\rRow=0;\rCol=0;\rfor(i=0;i<N;i++)\r{for(j=0;j<M;j++)\rif(max<array [i][j])\r{max=array [i][j];\rRowi;\rCol=j;}\r)\rreturn(max);

收藏

分享

举报
下载此文档