|
|
вернуться в форумHELP me please, what's wrong? 1st test is right but in 2 i have WA... program z1567; var s:char; sum:integer; begin while not eof do begin read(s); if (s='a') then sum:= sum+1; if (s='b') then sum:= sum+2; if (s='c') then sum:= sum+3; if (s='d') then sum:= sum+1; if (s='e') then sum:= sum+2; if (s='f') then sum:= sum+3; if (s='g') then sum:= sum+1; if (s='h') then sum:= sum+2; if (s='i') then sum:= sum+3; if (s='j') then sum:= sum+1; if (s='k') then sum:= sum+2; if (s='l') then sum:= sum+3; if (s='m') then sum:= sum+1; if (s='n') then sum:= sum+2; if (s='o') then sum:= sum+3; if (s='p') then sum:= sum+1; if (s='q') then sum:= sum+2; if (s='r') then sum:= sum+3; if (s='s') then sum:= sum+1; if (s='t') then sum:= sum+2; if (s='u') then sum:= sum+3; if (s='v') then sum:= sum+1; if (s='w') then sum:= sum+2; if (s='x') then sum:= sum+3; if (s='w') then sum:= sum+1; if (s='z') then sum:= sum+2; if (s='.') then sum:= sum+1; if (s=',') then sum:= sum+2; if (s='!') then sum:= sum+3; if (s=' ') then sum:= sum+1; end; write(sum); end. |
|
|