|
|
вернуться в форумwhere my mistake? Послано CaNoN 31 дек 2012 01:52 var s: char; i, sim: integer; begin sim:=0; while not EOF do begin //for i:=1 to s do begin read (s); if ((s='a') or (s='d') or (s='g')or(s='g') or (s='m')or (s='p') or (s='t') or (s='w')) then sim:= sim+1 else if ((s='b') or (s='e') or (s='h') or (s='k') or(s='n') or (s='q') or (s='u') or (s='x')) then sim:= sim+2 else if ((s='c') or (s='f') or (s='i') or (s='o') or (s='r') or (s='v') or (s='y')) then sim:= sim+3 else if ((s='s') or (s='z')) then sim:=sim+4 else if (s=' ') then sim:=sim+1 else if (s='.') then sim:= sim+1 else if (s=',') then sim:= sim+2 else if (s='!') then sim:= sim+3 end end; write (sim); end. Edited by author 31.12.2012 01:58 |
|
|