下述程序段的执行结果是( )。 #include <stdio.h> Void main() { int x; for(x=1;x<=100;x++) if(++x%3==0) if(++x%4==0) i

admin2010-05-22  19

问题 下述程序段的执行结果是(  )。    #include  <stdio.h>    Void main()    {  int x;     for(x=1;x<=100;x++)    if(++x%3==0)    if(++x%4==0)    if(++x%7==0)    printf("%d",x);    }

选项 A、75
B、76
C、77
D、84

答案8

解析 程序段的功能是找出100以内能同时被3、4、7整除的数,只有选项D符合题意。
转载请注明原文地址:https://kaotiyun.com/show/NVWp777K
0

随机试题
最新回复(0)