Pagini recente » Cod sursa (job #1340170) | Cod sursa (job #1694371) | Cod sursa (job #2419263) | Cod sursa (job #639844) | Cod sursa (job #335262)
Cod sursa(job #335262)
var a:char;
t:text;
k:boolean;
lung,cuv:int64;
function adevarat(c:char):boolean;
begin
adevarat:=((ord(c)>64)and(ord(c)<91))or((ord(c)>96)and(ord(c)<123));
end;
begin
assign(t,'text.in'); reset(t);
lung:=0;
cuv:=0;
k:=false;
while not(eof(t)) do begin
while not(eoln(t)) do begin
read(t,a);
if adevarat(a) then begin inc(lung);
if k=false then inc(cuv);
k:=true;
end else k:=false;
end;
readln(t);
end;
close(t);
assign(t,'text.out'); rewrite(t);
writeln(t,(lung mod cuv));
close(t);
end.