在下列程序中,判断i>j共执行了____次。()
#include
main()
{inti,j,k,s;
i=0,j=10,k=2,s=0;
for(;;)
{i+=k;
if(i>j)
{prinff("%d\n:",s);
break;}
s=s+i;}
}
A.4 B.7 C.5 D.6正确答案D
在下列程序中,判断i>j共执行了____次。()
#include
main()
{inti,j,k,s;
i=0,j=10,k=2,s=0;
for(;;)
{i+=k;
if(i>j)
{prinff("%d\n:",s);
break;}
s=s+i;}
}
A.4 B.7 C.5 D.6正确答案D