若S值为-7,则框内为( )。 A.i

作者: tihaiku 人气: - 评论: 0
问题 若S值为-7,则框内为( )。
选项 A.i<3 B.i<4 C.i<5 D.i<6
答案 D
解析 第一次执行循环结果为S=2-1=1,i=1+2=3;第二次执行循环结果为S=1-3=-2,i=3+2=5;第三次执行循环结果为S=2-5=-7,i=5+2=7,此时S达到-7,输出并结束,故框内可以为“i<6 ”。

猜你喜欢

更多 网友评论0 条评论)
暂无评论
错误啦!

错误信息

  • 消息: [程序异常] : MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
  • 文件: /twcms/kongphp/cache/cache_redis.class.php
  • 位置: 第 85 行
    <?php echo 'KongPHP, Road to Jane.'; ?>