Версия для печати темы

Нажмите сюда для просмотра этой темы в обычном формате

Форум «Всё о Паскале» _ Задачи _ операции с файлами

Автор: Денис домосед+ 19.12.2013 3:48

помогите решить на делфи:программа считывает текст из файла, и в каждом предложении удалять самое маленькое слово.

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Button2: TButton;
Button3: TButton;
Image1: TImage;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1:TForm1;
f:Textfile;
str:string;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.Clear;
assignfile(f,'11.txt');
reset(f);
while not EOF(f) do
begin
readln(f,str);
memo1.Lines.Add( str );
end;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
memo1.Clear;
end;

end.