void main()
{ char a; int i;
cin>>a;
for(i=1;i<=10;i++)
{ if((a>=’a’)&&(a<=’z’))
a=a-i;
cout<<a;
}
}
若在程序运行时键入z,则输出结果为( )。
A.zyxwvu B.yxwvutsrqp
C.ywtpke^^^^ D.ytqmhb[[[[
6、对while、do…while循环结构,下面说法正确的是( )。
A.只是表达形式不同
B.do…while结构中的语句至少执行一次
C.while结构中的语句至少执行一次
D.条件成立时,它们有可能一次也不执行
7、以下不正确的是( )。
A.语句for(i=0;;i++)表示无限循环
B.for(;;)表示无限循环
C.for()也表示无限循环
D.while(1)表示无限循环
8、下面循环体的执行次数为( )。
#include<iostream >
using namespace std;
void main()
{ int a,b;
for(a=0,b=5;a<=b+1;a+=2,b- -) cout<<a<<endl;
}
A.3 B.2 C.1 D.0
9、对中断语句break和continue的说法,下面不正确的是( )。
A.用户可以指定中断的位置
B.用户可以指定转移的位置
C.break语句可以跳出本循环
D.continue语句可以结束本次循环
10、有以下程序段:
int n=0;
while (n=1) n++;
则:while循环执行次数是( )。
A.0次 B. 1次 C. 无限次 D. 无法确定
Chapter 4 exercise 5页 2财富值 exercise for chapter 1-2 26页 免费 Chapter 3-exercise 7页 2财富值 chapter 5 exercise 2页 免费 chapter 1-Exercise(...
Programming15_chapter8_31/2 相关文档推荐 exercise2 10页 2财富值 Exercise2 2页 2财富值 Exercise2 1页 免费 Exercise2-1 暂无评价 10页 5财富值 ...
暂无评价 7页 1财富值 Chapter 4 exercise 5页 2财富值 exercise for chapter 1-2 26页 免费 chapter 5 exercise 2页 免费...
暂无评价 7页 1财富值 Chapter 4 exercise 5页 2财富值 exercise for chapter 1-2 26页 免费 chapter 5 exercise 2页 免费...
Programming16_exercise21/2 相关文档推荐 Programming02_chapter2 暂无评价 26页 免费 Chapter3 65页 免费 chapter3 79页 2财富值 Chapter3 85页 2财富值 ...
exercise chapter 1&2_英语学习_外语学习_教育专区。物流英语作业 上海海事大学Exercise Chapter 1 Introduction 1. Key Terms 1). absolute advantage An economic...
chapter 2 exercise 2页 1财富值 exercise chapter 1&2 7页 1财富值 exercise of Chapter 2 9页 免费 Chapter One Exercise ... 暂无评价 4页 免费 语言...
Chapter4 American Econ... 26页 1下载券 About American Eco... 4页 2... The government can still exercise some control over the market economy ...
exercise chapter 3 暂无评价 16页 免费 chapter 3 exercise 暂无评价 9页 5财富值 EXERCISE (B) OF CHAPTER ... 7页 10财富值 EXERCISE (A) OF CHAPTER...
8B Chapter 5 Exercise 2页 1下载券 Exercise for Chapter 5... 暂无评价 2页 2下载券 Chapter 4 exercise 5页 1下载券 exercise for chapter 1... 26...
热门文档