
29.01.2007, 08:02
|
 |
Модератор
|
|
Регистрация: 07.10.2005
Адрес: Москва
Сообщения: 2,907
Версия Delphi: Delphi XE
Репутация: выкл
|
|
Код:
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils,Windows;
type
TData = record
Text:ShortString;
Count:Byte;
end;
var
Rec:TData;
i:integer;
begin
ZeroMemory(@Rec,SizeOf(TData));
WriteLn('Intut text');
ReadLn(Rec.Text);
for i:=1 to Length(Rec.Text) do
if Rec.Text[i]='A' then
Inc(Rec.Count);
WriteLn;
WriteLn('Symbol "A" founded '+IntToStr(Rec.Count)+' once');
ReadLn;
end.
|