Pagini recente » Clasament test_12 | Cod sursa (job #1899768) | Cod sursa (job #715223) | Cod sursa (job #2258563) | Cod sursa (job #291777)
Cod sursa(job #291777)
program test;
var be,ki:text;
nrcuvinte,lungcuvinte:longint;
c:char;
H:set of char;
begin
h:=['A'..'Z','a'..'z','0'..'9'];
assign(be,'text.in');
assign(ki,'text.out');
reset(be);
rewrite(ki);
nrcuvinte:=1;
lungcuvinte:=0;
repeat
read(be,c)
until c<>' ';
repeat
if c=' ' then inc(nrcuvinte);
while c=' ' do
begin
if eoln(be) then break
else read(be,c);
end;
while c<>' ' do
begin
if c in h then inc(lungcuvinte);
if eoln(be) then break
else read(be,c);
end
until eoln(be);
writeln(ki,int(lungcuvinte / nrcuvinte):1:0);
close(ki);
end.