Advertisement
GamerSK

Preklad

Mar 23rd, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.85 KB | None | 0 0
  1. //napiste program ktory umozni preklad slovicka do cudzieho jazyka
  2. program prekladac;
  3. {$APPTYPE CONSOLE}
  4. uses SysUtils;
  5. var n,i:byte;
  6.     sks,ajs:array[1..255] of string;
  7.     hs:string;
  8.     ns:boolean;
  9. begin
  10.   { TODO -oUser -cConsole Main : Insert code here }
  11.   write('Zadajte pocet slov, ktore chcete zadat: ');
  12.   readln(n);
  13.   for i:=1 to n do
  14.     begin
  15.       write('Zadajte ',i,'. slovo v Slovencine: ');
  16.       readln(sks[i]);
  17.       write('Zadajte ',i,'. slovo v Anglictine: ');
  18.       readln(ajs[i]);
  19.     end;
  20.   for i:=1 to n do
  21.     begin
  22.       writeln(sks[i],' - ',ajs[i]);
  23.     end;
  24.   writeln('Ake slovo chcete prelozit?: ');
  25.   readln(hs);
  26.   ns:=false;
  27.   for i:=1 to n do
  28.     begin
  29.       if (hs=sks[i]) or (hs=ajs[i]) then ns:=true
  30.         else ns:=false;
  31.       if ns=true then writeln(sks[i],' - ',ajs[i]);
  32.     end;
  33.   readln;
  34. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement