А прогрмаммирование круче. Сейчас нам задали задание "Задать всего 4 вопроса, ответы которых могут иметь только "да" и "нет", чтобы можно было определить месяц рождения". Сейчас сижу пишу программу.
Привет Паскалю. Зачем он когда-то вообще изобрел калькулятор? =/
Харуки, Ну так не прокатывает) всего 4 вопроса задать. Там сначала спрашиваешь в первом полугодии, потом четверти, потом паре, ну и т.д.
Но страшней всего ПРОГРАММА к ней! Показать? *ухмыльнулась*
begin clrsrc;
writeln ('V pervoy polovine goda?');
writeln ('1-da, 0-net');
readln (a);
writeln ('V pervoy polovine polugodiya?');
writeln ('1-da, 0-net');
readln (b);
writeln ('V pervyh dvuh mesyacah chetverty?');
writeln ('1-da, 0-net');
readln (c);
If (c=0) then begin
If (a=1) and (b=1) then writeln ('Vy rodilis' v marte');
If (a=1) and (b=0) then writeln ('Vy rodilis' v iyune');
If (a=0) and (b=0) then writeln ('Vy rodilis' v dekabre');
If (a=0) and (b=1) then writeln ('Vy rodilis' v sentyabre');
end;
If (c=1) then begin
writeln ('V pervom mesyace etoy pary?');
writeln ('1-da, 0-net');
read (d);
If (a=1) and (b=1) and (d=1) then writeln ('Vy rodilis' v yanvare');
If (a=1) and (b=1) and (d=0) then writln ('Vy rodilis' v fevrale');
If (a=1) and (b=0) and (d=0) then writeln ('Vy rodilis' v mae');
If (a=1) and (b=0) and (d=1) then writeln ('Vy rodilis' v aprele');
If (a=0) and (b=0) and (d=0) then writeln ('Vy rodilis' v noyabre');
If (a=0) and (b=0) and (d=1) then writeln ('Vy rodilis' v oktyabre');
If (a=0) and (b=1) and (d=1) then writeln ('Vy rodilis' v iyule');
If (a=0) and (b=1) and (d=0) then writeln ('Vy rodilis' v avguste');
end;
end;
readkey;
end.
Вопрос, где ошибка? *залилась истерическим смехом*