Cod sursa(job #1526036)

Utilizator cristionCristian Boicu cristion Data 15 noiembrie 2015 20:49:30
Problema Text Scor 30
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.36 kb
program p3;
var s:string;
a,n,i :integer;
j:real;
f,g:text;
begin
assign (f,'text.in');
reset (f);
assign (g,'text.out');
rewrite (g);
read (f,s);
n:=1;
for i:=1 to length(s) do begin
If s[i] in ['-',' '] then n:=n+1;
If s[i] in ['a'..'z'] then a:=a+1;
If s[i] in ['A'..'Z'] then a:=a+1;
end;
j:=a/n;
writeln (g,j:0:0);
close (f);
close (g);
end.