|  | 
|  | 
| вернуться в форум | hint Послано Anton  18 дек 2011 19:03use state machine with char-by-char reading. We know last char and last state, so we can find next state. Brackets should be counting during reading. If we have '(', so we plus 1, ')' - minus 1. If brackets < 0 and state is some of arifmetic state - it's error. | 
 | 
|