Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function repet (c:Char;ch:String): String;
- Var
- i,s: Integer;
- Begin
- s := 0;
- For i:=1 To Length(ch) Do
- If ch[i]=c Then
- s := s+1;
- Str (s,ch);
- repet := ch;
- End;
- Function facteur (a:Integer): String;
- Var
- i,e,x: Integer;
- ch,ch1: String;
- Begin
- i := 1;
- ch1 := '';
- Repeat
- i := i+1;
- If a Mod i =0 Then
- Begin
- a := a Div i;
- Str(i,ch);
- ch1 := ch1+ch+'*';
- i := 1;
- End;
- Until (a Div i=0);
- ch := '';
- Repeat
- ch := ch+ch1[1]+'_'+repet(ch1[1],ch1)+'*';
- Val (repet(ch1[1],ch1),x,e);
- Delete (ch1,1,x*2);
- Until (ch1='');
- Delete (ch,Length(ch),1);
- facteur := ch;
- End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement