lonsomehell

recherche caractére

Mar 13th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.29 KB | None | 0 0
  1. program Recherche_caractere ;
  2. Uses wincrt ;
  3. Var
  4. ch:string ;
  5. i: integer ;
  6. Ex:string;
  7. c,a: char;
  8. Begin
  9. Readln (ch);
  10. readln (c);
  11. for i:=1 to length(ch) do
  12.  
  13. Begin
  14. a:=ch[i];
  15. if a=c then ex:='existe'
  16. else if ex='existe' then
  17. ex:='existe' else ex:='n"existe pas'
  18. end;
  19.  
  20. writeln(ex);
  21. end.
Advertisement
Add Comment
Please, Sign In to add comment