Cod sursa(job #1538811)

Utilizator Vlad_CernoutanVlad Cernoutan Vlad_Cernoutan Data 29 noiembrie 2015 20:16:44
Problema Text Scor 10
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.53 kb
Program text1;
 var a : string;
     fi, fo : text;
     i, k1, k2 : integer;

begin
 assign(fi, 'text.in');
 assign(fo, 'text.out');
 reset(fi);
 rewrite(fo);
 readln(fi, a);
 for i:=1 to length(a) do if a[i] in ['a'..'z', 'A'..'Z'] then begin
                                                              inc(k1); inc(k2)
                                                              end
                                                              else inc(k2);
 writeln(fo, k2 div k1);
 writeln(fo);
 close(fo);
end.