Advertisement
Guest User

while-puesto

a guest
Oct 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.40 KB | None | 0 0
  1. program refuer(input, output);
  2.  
  3.  
  4. VAR
  5.    str: string(50);
  6.    aux : boolean;
  7. BEGIN
  8.  
  9.      aux := true;
  10.      while (aux) do
  11.      BEGIN
  12.           write('Introduzca su puesto: ');
  13.           readln(str);
  14.           if (str = 'becario') then
  15.              aux := false
  16.           else
  17.               writeln('Valor incorrecto');
  18.     END;
  19.  
  20.      writeln('Pulse enter para finalizar...');
  21.      readln;
  22. END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement