Professional Documents
Culture Documents
G.C.E. (O.level) Grade 11 Information and Communication Technology Pascal Programs
G.C.E. (O.level) Grade 11 Information and Communication Technology Pascal Programs
level)
Grade 11
Information and Communication Technology
Pascal Programs
1
writeln('6>4 is : ',6>4);
writeln('7<=5 is : ',7<=5);
writeln('2=4 is : ',10>=4);
writeln('20 = 6 is : ',20 = 6);
writeln('5 = 5 is : ',5 = 5);
writeln('20 <> 6 is : ',20 <> 6);
writeln('5 <> 5 is : ',5 <> 5);
readln;
end.
2
Bill value(n) – above 5000 – Discount(d) = n*0.1
Bill value(n) – equal or below 5000 – Discount(d) = n*0.0.5
Display bill value,discount,payable price
Program 08 - Display multiplication table of 8 (8 x 1 = 8)
Program 09 - calculate even numbers between 0 and 99
An algorithm
1. Start
2. I ← 0
3. Write I in standard output
4. I ← I+2
5. If (I <=98) then go to line 3
6. End
3
Program 12 - While do program
program whiledo;
Var count : integer;
begin
count:=1;
while count<=10 do
begin
write(count,', ');
count:=count+1;
end;
readln;
end.
Program 13 Repeat until program
program whiledo;
Var count : integer;
begin
count:=0;
repeat
count:=count+5;
write(count,', ');
until count >= 50;
readln;
end.