阅读程序写结果试题第四第五章Word下载.docx
《阅读程序写结果试题第四第五章Word下载.docx》由会员分享,可在线阅读,更多相关《阅读程序写结果试题第四第五章Word下载.docx(21页珍藏版)》请在冰豆网上搜索。
![阅读程序写结果试题第四第五章Word下载.docx](https://file1.bdocx.com/fileroot1/2022-12/9/24630b49-1c72-4dbc-8bdd-aee9e9ca5eaf/24630b49-1c72-4dbc-8bdd-aee9e9ca5eaf1.gif)
printf("
ch1=%c\n"
ch1);
4.#include<
x=5;
y=3;
if(x>
5.#include<
intmain()
inta,b,c,m;
Enterthreeintegers:
"
);
scanf("
%d%d%d"
&
a,&
b,&
c);
if(a<
=b)
m=a;
m=b;
if(c<
m)
m=c;
m=%d\n"
m);
return0;
输入:
212223<
回车>
6.#include<
charch1='
a'
ch2='
B'
ch3='
if(ch1>
ch2)
if(ch2>
ch3)
ch3++;
else
--ch3;
ch3=%c\n"
ch3);
7.#include<
floatx,y;
%f"
x);
switch((int)x/10)
{
case0:
y=1.0;
printf("
y=%f\n"
y);
break;
case1:
y=2*x+1;
case2:
y=3*x*x+2;
default:
Nodefinition.\n"
15.3<
8.#include<
switch(ch1)
case'
:
switch(ch2)
{
case'
Good!
\n"
Better!
}
Best!
9.
#include<
voidmain()
floatscore;
score=100;
if(score<
60)printf("
E\n"
switch((int)score/10)
{case10:
case9:
A\n"
case8:
B\n"
case7:
C\n"
case6:
D\n"
default:
Error\n"
程序阅读理解
(二)
10.#include<
inti=0,a=2;
if(i==0)
printf(“**”);
else
printf(“$$”);
printf(“*”);
1.#include<
intm=10,n=0,p=4,q=20;
if(m)
if(n)
q=15-m;
else
q=25+m;
elseif(p)
q=q+p;
printf(“q=%d\n”,q);
}
2.
#include<
inta=1,b=0;
switch(a)
switch(b)
case0:
printf(“**0**”);
printf(“**1**”);
case2:
printf(“**2**”);
3.#include<
intmain()
inta=2,b=7,c=5;
switch(a>
0){
case1:
switch(b<
@"
break;
!
case0:
switch(c==5){
*"
);
default:
#"
&
4.#include<
inta=0,b=1,c=0,d=20;
if(a)d=d-10;
elseif(!
b)
if(!
c)d=15;
elsed=25;
d=%d\n"
d);
5.#include<
{inta=1;
switch(a){
**0**"
**1**"
**2**"
6.#include<
{intx,y;
%d"
y=x>
12?
x+10:
x-12;
%d\n"
y);
12<
7.#include<
floatx,y;
charop;
doubler;
%c%f%f"
op,&
x,&
y);
switch(op)
{case'
+'
r=x+y;
case'
-'
r=x-y;
*'
r=x*y;
/'
r=x/y;
%.1f"
r);
3.5<
8.#include"
stdio.h"
inta=7;
if(a>
9||a<
10)
a=a/3;
a=a%3;
a=%d"
a);
9.
inta=20;
switch(a%3)
{
0"
1"
2"
3"
4"
10.
inta=2,b=5,c=8,t;
if(a<
b){t=a;
a=b;
b=t;
if(b<
c){t=b;
b=c;
c=t;
printf("
a++,--c);
程序阅读理解(三)
1.
intnumber,digit;
number=1234;
while(number!
=0)
digit=number%10;
printf("
digit);
number=number/10;
#defineN5
inti;
for(i=1;
i<
N;
i++)
i*i);
3.
inti,s,x;
s=0;
x=15;
for(i=1;
=5;
if(x%i==0)
s=s+i;
i=%d,s=%d\n"
i,s);
4.
intcounter=1;
while(counter<
=5)
{
printf("
%d\n"
counter);
counter++;
5.
inti,sum,m,a;
sum=0;
m=5;
for(i=0;
=3;
scanf("
a);
sum+=a;
sum=%d\n"
sum);
21083<
6.
inti,j,k;
=4;
for(j=1;
j<
5-i;
j++)
"
for(k=1;
k<
=i;
k++)
7.
inti,j;
i=1;
while(i<
5)
for(j=1;
2*i+1;
%c"
'
#'
i++;
8.
inti=10,m=0,n=0;
do
if(i%2!
=0)
m=m+i;
n=n+i;
i--;
}while(i>
=0);
m=%d,n=%d\n"
m,n);
intsum=0,n;
n);
while(n<
=5)
sum+=n;
n++;
sum=%d"
1<
10.
inti,j;
for(i=2;
i>
=0;
i--)
for(j=0;
=2-i;
程序阅读理解(四)
1.
inta,b;
for(a=1,b=1;
a<
=100;
a++)
if(b>
20)break;
if(b%4==1)
b=b+4;
continue;
b=b-5;
a=%d\n"
a);
2.
chark;
inti;
3;
k);
switch(k)
case'
0'
another\n"
1'
number\n"
}
01<
inti,s=0;
for(i=1;
i<
10;
i++)
s+=i*i;
if(s>
10)break;
i=%d,s=%d\n"
i,s);
}
charch;
while((ch=getchar())!
='
\n'
if(ch>
ch<
Z'
ch=ch+32;
elseif(ch>
z'
ch=ch-32;
ch);
ABCdef<
5.
intmain()
inta,b;
for(a=1,b=1;
a<
=100;
a++)
if(b>
=9)break;
if(b%3==1)
b+=3;
continue;
b-=5;
a,b);
6.#include<
inti=0,j=0;
while(i<
10)i++;
while(j++<
10);
i=%d,j=%d\n"
i,j);
7.#include"
inti,j,t;
for(i=1,j=10;
i++,j--)
t=i+j;
t++;
%d,%d"
j,t);
8.#include"
inti=10,j;
j=i%2;
j);
}while(i>
4);
9.#include"
inti=7,j;
while(i>
2)
}
i);
10.#include<
inti,j,t=0;
for(i=3;
0;
4;
t+=j;
t=%d"
t);