var grade:char; c,p,f:integer; begin repeat write('enter a grade:'); readln(grade); if grade<>'Z' then case grade of 'A'..'C':begin c:=c+1; p:=p+1; end; 'D'..'E':p:=p+1; 'F':f:=f+1; end; until grade='Z'; writeln('credit:',c,' ',(c/(p+f)):0:2); writeln('pass:',p,' ',(p/(p+f)):0:2); writeln('fail:',f,' ',(f/(p+f)):0:2); end.