Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Exercice 12:
- Écrire un programme permettant d'enlever les caractères qui se répètent dans une chaîne ch.
- Exemples :ch="sciences" → "scien" "programmation" → "progamtin"}
- program yet3awed ;
- uses WinCrt ;
- var
- ch : String;
- a,b : Integer ;
- Procedure ebda(var ch : String);
- Begin
- Write('ekteb kelma : ');
- Readln(ch);
- end;
- Procedure fas5( ch : String);
- Var a : Integer ;
- b : Integer ;
- Begin
- for a:= 1 to Length(ch) do
- Begin
- for b:=1 to Length(ch) do
- begin
- if ch[a] = ch[b] then
- Delete(ch,b,1);
- End;
- end;
- end;
- Procedure affch(ch : String);
- Begin
- WriteLn(ch);
- end;
- begin
- ebda(ch);
- fas5(ch);
- affch(ch);
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement