Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function WrWthSpace(n:integer):string;
- var res:string;
- begin
- repeat //repeat until resuly eq 0
- res:=n mod 10+' '+res; //add to result variable reminder of division n on 10, add space and res
- n:=n div 10; //cut last discharge inputted num
- until n=0; //cycle end
- WrWthSpace:=res; //assign func result variable named res(result)
- end;
- var n:integer;
- begin
- read(n); //read input num
- Write(WrWthSpace(n)); //write num divided by spaces
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement