Цитата:
Сообщение от Monro
Спасибо большое)))
|
Вот. Теперь пускай вводит, чего хочет - хоть цифровую строку!
Код:
VAR
St:Array[1..255] of String;
i,M,j:Byte;
B_b,B_s:Boolean;
BEGIN
Write('Number of strings (<256)= ');
Readln(M);
For i:=1 to M do
begin
Writeln(i:2,' string:');
Readln(St[i]);
end;
Writeln;
For i:=1 to M do
begin
Write(i:2);
B_b:=false;
B_s:=false;
For j:=1 to Length(St[i]) do
begin
If (Ord(St[i][j])>64) and (Ord(St[i][j])<91) then B_b:=true;
If (Ord(St[i][j])>96) and (Ord(St[i][j])<123) then B_s:=true;
end;
If (B_b=true) and (B_s=false) then Writeln(' Big') else
If (B_b=false) and (B_s=true) then Writeln(' Small') else
If (B_b=true) and (B_s=true) then Writeln(' Small and Big') else
Writeln(' String contains no letters');
end;
Readln;
END.