- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
program stroki;
uses
crt;
var
S, ns: string[80];
t, f, f1, kc, ks, d, i: byte;
const
n = '1234567890';
a = 'abcdefghijklmnopqrstuvwxyz';
begin
kc := 0;
ks := 0;
clrscr;
read(S);
d := length(S);
for i := 1 to d do
begin
t := pos(S[i], n);
if t > 0 then
begin
ns := ns + S[i];
f := 1;
end
else
begin
if f = 1 then
kc := kc + 1;
f := 0;
delete(ns, 1, length(ns));
end
end;
f := 0;
delete(ns, 1, length(ns));
for i := 1 to d do
begin
t := pos(S[i], a);
if t > 0 then
begin
ns := ns + S[i];
f := 1;
end
else
begin
if f = 1 then
ks := ks + 1;
f := 0;
delete(ns, 1, length(ns));
end
end;
if (kc = 0) and (ks = 0) then
begin
clrscr;
write('no symbols and digets');
readkey;
end;
if kc > ks then
begin
clrscr;
write('a lot of digets');
readkey;
end
else
begin
clrscr;
write('a lot of symbols');
readkey;
end;
if kc = ks then
begin
clrscr;
write('они равны');
readkey;
end
end.
J 21.03.2010 13:15 # −2.8
guest 21.03.2010 13:29 # −2.8
guest 21.03.2010 19:21 # −1.2
(я петросян)
guest 21.03.2010 13:28 # +2.2
klem4 21.03.2010 13:57 # +4.6
guest 21.03.2010 18:30 # +6