Показать сообщение отдельно

  #17  
Старый 23.06.2007, 18:01
Joker-jar
Постоянный
Регистрация: 11.03.2007
Сообщений: 581
Провел на форуме:
4172659

Репутация: 646


По умолчанию

Fire3d, написал небольшой примерчик:
Код:
const
  Tqs: array[1..5] of string = ('Vopros 1','Vopros 2','Vopros 3','Vopros 4','Vopros 5');
  Tans: array[1..5] of boolean = (true,true,false,true,false);

var
  s: string;
  i,count: integer;

begin
  writeln('Otvet: y or n');
  for i := 1 to 5 do
    begin
      writeln(Tqs[i]);
      readln(s);
      if ((s = 'y')and(Tans[i]))or((s = 'n')and(not Tans[i])) then
        count := count + 1;
    end;
  writeln('Right answers: ',count);
  readln;
end.
 
Ответить с цитированием