Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.44 KB | None | 0 0
  1. program Project1;
  2.  
  3. var
  4.  
  5.   mot,paragraph:string;
  6.   index:integer;
  7. begin
  8.    write('entre string:');
  9.    readln(mot);
  10.    while(mot<>'') do
  11.    begin
  12.     index:=pos('.',mot);
  13.     if index>0 then
  14.         paragraph:=copy(mot,1,index-1)
  15.     else
  16.       begin
  17.  
  18.         index:=Length(mot);
  19.         paragraph:=copy(mot,1,index);
  20.  
  21.       end;
  22.  
  23.     writeln('paragraph :',paragraph);
  24.     Delete(mot,1,index);
  25.  
  26.    end;
  27.  
  28.  
  29.  
  30. readln;
  31. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement