Pagini recente » Cod sursa (job #1464459) | Cod sursa (job #549563) | Cod sursa (job #470035) | Cod sursa (job #717598) | Cod sursa (job #46803)
Cod sursa(job #46803)
var f,g:text;
car,cuv:longint;
c,d:char;
s:string;
begin
assign(f,'text.in');
reset(f);
readln(f,s);
close(f);
reset(f);
car:=0;
cuv:=0;
d:=' ';
while not eof(f) do begin
read(f,c);
if ((upcase(c)<'A') or (upcase(c)>'Z')) and (upcase(d)>='A') and (upcase(d)<='Z') then begin
cuv:=cuv+1;
d:=c;
continue;
end;
if (upcase(c)>='A') and (upcase(c)<='Z') then car:=car+1;
d:=c;
end;
if (upcase(d)>='A') and (upcase(d)<='Z') then cuv:=cuv+1;
close(f);
assign(g,'text.out');
rewrite(g);
writeln(g,car div cuv);
close(g);
end.