№1.
Program
one
Var
a,b,c:integer;
Begin
WriteLn('a=');
ReadLn(a);
WriteLn('b=');
ReadLn(b);
WriteLn('c=');
ReadLn(c);
If a<b
a<c Then WriteLn(a, ' - меньшее')
Else If b<a
b<c Then WtiteLn(b, '- меньшее')
Else If c<a
c<b WriteLn(c, ' - меньшее')
Else If a=b=c
WriteLn('числа равны')
End.
№2.
Program two
Var a,b:integer;
Begin
WriteLn('Возраст Саши');
ReadLn(a);
WriteLn('Возраст Маши');
ReadLn(b);
If a>b Then
WriteLn('Саша старше Маши')
Else If b<a
Then WtiteLn('Маша старше Саши')
Else
If a=b Then WriteLn ('Возраст Маши равен возрасту Саши')
End.
№3.
Program three
Var x:integer;
Begin
WriteLn('Введите номер дня недели')
ReadLn(x);
If x=1 Then
WriteLn('понедельник')
Else If x=2
Then WriteLn('вторник')
Else
If x= 3 Then WriteLn('среда')
Else If x=4
Then WriteLn('четверг')
Else If x=5
Then WriteLn('пятница')
Else If x=6
Then WriteLn('суббота')
Else If x=7
Then WriteLn('воскресенье')
Else
If x>7 Then WriteLn('нет такого дня недели');
End.
№4.
Program example;
Var x,y,z,I :integer;
Begin
ReadLn(a,b,c);
i:=0;
If a>0 then
i:=i+1;
If b>0 then
i:=i+1;
If c>0 then
i:=i+1;
WriteLn(i)
End.
Эта
программа вычисляет количество введенных чисел больше нуля.
Пример
исходных данных и результата:
I
x=5
y=-3
z=1
i=2
II
x=0