数模论坛

 找回密码
 注-册-帐-号
搜索
热搜: 活动 交友 discuz
查看: 1795|回复: 5

大家看看这个程序有什么问题

[复制链接]
发表于 2005-9-18 22:19:43 | 显示全部楼层 |阅读模式
<>#include&lt;stdio.h&gt;<BR>main()<BR>{static int M[100][20]={{0,0,2,0,0,0,9,1,0,5,7,0,0,8,0,3,6,0,0,4},<BR>{1,0,9,0,0,7,0,0,4,0,0,2,0,6,3,0,0,8,5,0},<BR>{0,6,0,0,0,7,0,0,0,0,0,4,1,3,8,0,2,0,9,5},<BR>{0,0,0,0,4,0,7,6,0,0,3,1,0,5,9,0,8,0,2,0},<BR>{5,0,0,0,0,4,7,0,0,9,0,0,3,0,2,8,6,0,1,0},<BR>{4,0,6,0,0,8,0,5,9,0,0,3,0,0,1,2,0,0,7,0},<BR>{0,0,6,3,0,0,1,2,8,0,4,0,0,0,0,5,0,0,9,7},<BR>{3,0,0,0,0,0,0,8,0,0,7,9,1,2,0,6,0,5,4,0},<BR>{0,3,2,9,0,0,7,5,0,6,0,0,0,0,1,4,0,8,0,0},<BR>{7,0,0,0,0,0,0,6,0,1,4,2,0,0,0,0,5,3,0,0},<BR>{0,0,4,0,0,0,0,1,0,2,8,0,3,0,5,0,0,6,7,0},<BR>{0,8,0,0,4,0,7,0,0,6,2,0,5,3,9,0,0,0,1,0},<BR>{8,0,0,0,0,5,0,0,2,0,0,9,3,0,6,0,4,0,1,7},<BR>{7,0,9,0,0,3,0,0,0,0,0,4,6,0,0,1,2,5,8,0},<BR>{4,0,0,0,0,0,1,0,2,7,6,5,0,0,9,0,3,0,0,8},<BR>{3,0,9,0,0,0,6,1,2,0,4,0,0,0,0,0,7,8,5,0},<BR>{2,7,0,1,0,0,5,4,0,0,0,0,0,8,0,0,3,6,0,0},<BR>{7,5,0,0,0,0,1,0,0,0,3,0,9,0,0,4,8,2,0,6},<BR>{0,5,0,0,0,7,0,3,0,0,8,0,0,0,2,6,1,0,4,0},<BR>{0,0,9,0,4,2,7,0,1,8,0,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0,5,0},<BR>{3,0,8,0,1,2,0,0,0,7,9,6,5,4,0,0,0,0,0,0},<BR>{0,6,5,8,0,3,0,7,0,0,4,2,9,0,1,0,0,0,0,0},<BR>{0,0,2,8,5,0,6,0,1,0,3,0,0,7,0,9,4,0,0,0},<BR>{8,7,0,0,0,6,0,5,0,0,0,2,0,0,1,4,3,0,0,0},<BR>{3,8,6,0,4,1,0,0,2,0,0,7,0,9,0,0,5,0,0,0},<BR>{3,0,6,2,0,4,7,8,0,1,0,0,9,5,0,0,0,0,0,0},<BR>{0,0,0,6,5,0,1,7,2,0,3,0,8,0,0,0,0,4,9,0},<BR>{0,9,6,0,0,4,0,7,1,0,0,0,0,0,5,0,3,0,2,8},<BR>{7,1,0,0,8,9,0,0,6,0,4,2,0,3,0,0,0,0,0,5},<BR>{1,0,0,0,0,2,7,0,0,4,0,0,0,6,0,8,0,3,5,0},<BR>{0,1,4,0,6,0,5,0,9,0,8,0,2,3,0,0,0,7,0,0},<BR>{0,0,0,5,4,0,0,7,1,6,0,0,0,0,0,3,8,2,0,0}}<BR>int a=0;<BR>int b=0;<BR>int c=0;<BR>int d=0;<BR>int e=0;<BR>int f=0;<BR>int g=0;<BR>int h=0;<BR>int i=0;<BR>int j=0;<BR>int k=0;<BR>int l=0;<BR>int m=0;<BR>int n=0;<BR>int o=0;<BR>int p=0;<BR>int q=0;<BR>int r=0;<BR>int s=0;<BR>int t=0;<BR>int I,J,min=0;<BR>for(I=0;I&lt;=100;I++)<BR>printf("\n");<BR>{for(J=0;J&lt;=20;J++)<BR>if(M[I][J]==0);<BR>elseif(M[I][J]==1&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14'=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==2&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14'=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==3&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14'=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==4&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14':o=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==5&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14':o=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==6&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14':o=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==7&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14':o=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==8&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14':o=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}<BR>elseif(M[I][J]==9&amp;&amp;a&lt;=8&amp;&amp;b&lt;=22&amp;&amp;c&lt;=10&amp;&amp;d&lt;=8&amp;&amp;e&lt;=40&amp;&amp;f&lt;=40&amp;&amp;h&lt;=1&amp;&amp;i&lt;=8&amp;&amp;j&lt;=15&amp;&amp;k&lt;=19&amp;&amp;l&lt;=20&amp;&amp;m&lt;=10&amp;&amp;n&lt;=2&amp;&amp;o&lt;=5&amp;&amp;p&lt;=8&amp;&amp;q&lt;=30&amp;&amp;r&lt;=10&amp;&amp;s&lt;=8&amp;&amp;t&lt;=38)<BR>{min++;printf("(%d,%d)",I,J);<BR>switch(J)<BR>{case'0':a=a+1;break;<BR>case'1':b=b+1;break;<BR>case'2':c=c+1;break;<BR>case'3':d=d+1;break;<BR>case'4':e=e+1;break;<BR>case'5':f=f+1;break;<BR>case'6':g=g+1;break;<BR>case'7':h=h+1;break;<BR>case'8':i=i+1;break;<BR>case'9':j=j+1;break;<BR>case'10':k=k+1;break;<BR>case'11':l=l+1;break;<BR>case'12':m=m+1;break;<BR>case'13':n=n+1;break;<BR>case'14':o=o+1;break;<BR>case'15':p=p+1;break;<BR>case'16':q=q+1;break;<BR>case'17':r=r+1;break;<BR>case'18':s=s+1;break;<BR>case'19':t=t+1;break;<BR>}<BR>if(min==3),min=o,break;<BR>}}</P>
<>}</P>
 楼主| 发表于 2005-9-18 22:22:51 | 显示全部楼层
dvd 2[em06][em06][em06]
发表于 2005-9-18 22:32:13 | 显示全部楼层
<>这个是C语言的程序</P>
发表于 2005-9-18 22:33:06 | 显示全部楼层
[em06][em06][em06][em06][em01][em01]
 楼主| 发表于 2005-9-18 23:10:55 | 显示全部楼层
<>[em01]是啊</P>
<>但是哪里出错了?</P>
发表于 2005-9-19 10:22:30 | 显示全部楼层
<>可能是</P>
<>判断语句太多了</P>
您需要登录后才可以回帖 登录 | 注-册-帐-号

本版积分规则

小黑屋|手机版|Archiver|数学建模网 ( 湘ICP备11011602号 )

GMT+8, 2024-11-28 18:50 , Processed in 0.062289 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表