Cod sursa(job #405812)

Utilizator gabyca93Kuzman Gabriella gabyca93 Data 28 februarie 2010 19:42:51
Problema Text Scor 100
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.6 kb
var  f,g:text;
     szo,db:longint;
     a,b:char;

Begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);

szo:=0;  szo:=0;

read(f,a);
if upcase(a) in ['A'..'Z'] then begin db:=db+1;
                                      szo:=szo+1;
                                      end;

while not eof(f) do begin
       read(f,b);
       if upcase(b) in ['A'..'Z'] then db:=db+1;
       if (upcase(b) in ['A'..'Z'] ) and (not (upcase(a) in ['A'..'Z'])) then
                                      szo:=szo+1;
       a:=b;
       end;

writeln(g,db div szo);
close(f);
close(g);
end.