当前位置:文档之家› 少儿信息学奥赛模拟考一

少儿信息学奥赛模拟考一

四年级信息学奥赛第一次模拟考
满分:100分时间:60分钟
一、选择题(每题2分,共20分)
1、在Pascal语言中,保留字可分为()种类型。

A、5
B、8
C、7
D、6
2、下列哪一个是非法标识符?()
A、sinianji
B、h ello
C、ppsj
D、L554
3、-11 mod 3=()。

A、2
B、-2
C、3
D、-3
4、布尔类型标识符只有()种值。

A、4
B、3
C、2
D、1
5、下列程序有哪些语句编译错误?()
Var
a,b,c,d=longint; ①
Begin
Readln(a:b); ②
c:=a+b; ③
d=a-b; ④
Writeln(c,d); ⑤
End;
A、①②④
B、①②⑤
C、①②③
D、③④⑤
6、abs(-7.777777)等于()。

A、-7.777777
B、-7
C、0
D、7.777777
7、’A’的ASCII码值是多少?()
A、1
B、97
C、65
D、48
8、舍入函数(就是能把一个值四舍五入)标识符是()。

A、trunc
B、ord
C、chr
D、round
9、定义常量的标识符是()。

A、var
B、const
C、begin
D、end
10、下列哪一种属于字符类型?()
A、’”’
B、’abc’
C、’ _9’
D、’QAQ’
二、问题求解(一题5分,共10分)
(1)、根据下面两个算式,求○与△各代表多少?
△-○=2
○+○+△+△+△=56
△= ○=
(2)、一个长方形的周长是36厘米,长是宽的2倍,这个长方形的面积是多少?
三、看程序写结果(7+7+(3+4)+8)1、
Program test1(input,output);
Var
a,b,c,d:longint;
Begin
Readln(a,b);
c:=a div 10;
d:=b mod 100;
Writeln(c,' ',d);
End.
输入:100 123
输出:
2、
Program test2(input,output);
Var
a,b,c,d:longint;
Begin
Readln(a,b);
if a>b then c:=a
else c:=b;
if c=a then d:=b
else d:=a;
Writeln('c=',c,'_d=',d);
End.
输入:79 85
输出:
3、
Program test3(input,output);
Var
a,b:longint;
Begin
Readln(a,b);
if (a mod b=0) or (b mod a=0) then writeln('YES') else writeln('NO'); End.
输入1:3 9 输出1:
输入2:2 5 输出2:
4、
Program test4(input,output);
Var
A:longint;
Begin
Readln(a);
if (a<=100) and (a>90) then writeln('A'); if (a<=90) and (a>80) then writeln('B'); if (a<=80) and (a>70) then writeln('C'); if (a<=70) and (a>60) then writeln('D'); if a<=60 then writeln('E');
End.
输入:96
输出:
四、完善程序(15+15)
1、和(5+5+5)
给你两个数,你能用程序算出他们两个的和吗?
Var
a,b,c:longint;
Begin
Readln(__①__);
c:=___②___;
Writeln(__③__);
End.
2、买笔
一天小明有x元钱,他想买单价为a的铅笔,问他最多能买多少只铅笔?(注意:要用div)
Var
p,x,a:longint;
Begin
Readln(__①__);
p:=___②___;
Writeln(___③___);
End.。

相关主题