这其实就是打印的过程,可是在keil中,打印的时候总是把0都打印出来(用break的时候),当我用continue的时候不会。
在dev c++中,即使用break也不会把后面的0都打印出来。keil专属!!!
#include<stdio.h>
int numArr[11][8] =
{
{1,2,3,4,5,6,0},//0
{2,3,0}, //1
{1,2,7,5,4,0}, //2
{1,2,7,3,4,0}, //3
{6,2,7,3,0}, //4
{1,6,7,3,4,0}, //5
{1,6,7,3,4,5,0},//6
{1,2,3,6,0}, //7
{1,2,3,4,5,6,7,0},//8
{1,2,3,4,6,7,0},//9
{8,0} //dot
};
void show()
{
int i,j;
for(i=0;i<11;i++)
{
for(j=0;j<8;j++)
{
if(numArr[i][j] == 0)
break;
else
printf("%d",numArr[i][j]);
}
printf("\n");
}
}
int main()
{
show();
return 0;
}
|
|