Last active
April 18, 2017 15:05
-
-
Save Zulcom/5639d1883aacf12efdfc458ae49673fc to your computer and use it in GitHub Desktop.
PUCAЛKA Pascal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program min3; | |
var | |
a, b, c: integer; | |
begin | |
Write('Введите первое число: '); | |
ReadLn(a); | |
Write('Введите второе число: '); | |
ReadLn(b); | |
Write('Введите третье число: '); | |
ReadLn(c); | |
if (a < b) and (a < c) Then Writeln('Меньше первое: ',a) | |
Else if (b < a) and (b < c) Then Writeln('Меньше второе: ',b) | |
Else if (c < a) and (c < b) Then Writeln('Меньше третье: ',c) | |
Else if (a = b) and (b = c) Then Writeln('Числа равны'); | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program SashaMasha; | |
var | |
a, b: integer; | |
begin | |
WriteLn('Возраст Саши: '); | |
ReadLn(a); | |
WriteLn('Возраст Маши: '); | |
ReadLn(b); | |
if (a > b) Then WriteLn('Саша старше Маши') | |
else if (b > a) Then WriteLn('Маша старше Саши') | |
else if (a = b) Then WriteLn('Возраст Маши равен возрасту Саши'); | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) or (x < 1) Then WriteLn('нет такого дня недели'); | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program week; | |
var | |
x: integer; | |
begin | |
WriteLn('Введите номер дня недели'); | |
ReadLn(x); | |
if (x > 7) or (x < 1) Then WriteLn('нет такого дня недели') | |
else | |
case x of | |
1: WriteLn('понедельник'); | |
2: WriteLn('вторник'); | |
3: WriteLn('среда'); | |
4: WriteLn('четверг'); | |
5: WriteLn('пятница'); | |
6: WriteLn('суббота'); | |
7: WriteLn('воскресенье') ; | |
end; | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment