Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program ch5;
- {$H+}
- var
- stri : string;
- som, pre, c, e, x, sum : integer;
- BEGIN
- repeat
- readln(stri);
- stri := stri + ' ';
- pre := 0;
- sum := 0;
- repeat
- c := pos(' ', stri);
- Val(copy(stri, pre+1, c-1-pre), x, e);
- sum := sum + x;
- pre := c;
- stri[c] := 'n';
- until c=0;
- writeln(stri);
- until stri='n';
- END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement