code was rewritten, may be errors
fixed errors
fixed errors again
fixed misprint
empty lines added
Merge pull request #60 from dmitryvodop/lab3-development

Code was rewritten for 3rd lab