Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses wincrt;
- var CH:String[50];
- Function Check(CH:String[50]):Boolean;
- Var i:Byte;
- Begin
- i:=1;
- While (CH[i] in ['A'..'Z','a'..'z']) do
- Begin
- i:=i+1;
- End;
- Check:=(length(CH)<50) and (length(CH)=i);
- End;
- Procedure Saisie(Var CH:String[50]);
- Begin
- Repeat
- writeln('CH: ');
- readln(CH);
- Until Check(CH);
- End;
- Procedure Affiche(CH:String[50]);
- Var RES,RES1,RES2,RES3:String[50];
- i:byte;
- Begin
- RES:='';
- RES1:='';
- RES2:='';
- RES3:='';
- For i:=1 to length(CH) do
- Begin
- if not(CH[i] in ['A','E','I','I','U','Y']) and (CH[i] in ['A'..'Z']) then
- Begin
- RES:=RES+CH[i];
- End
- Else if (CH[i] in ['A'..'Z']) then
- Begin
- RES1:=RES1+CH[i];
- End
- Else if not(CH[i] in ['a','e','i','o','u','y']) and (CH[i] in ['a'..'z']) then
- Begin
- RES2:=RES2+CH[i];
- End
- Else if (CH[i] in ['a'..'z']) then
- Begin
- RES3:=RES3+CH[i];
- End;
- End;
- RES:=RES+RES1+RES2+RES3;
- writeln('Res: ',CH);
- End;
- Begin
- Saisie(CH);
- Affiche(CH);
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement