Create automat.cpp

first lesson with Markus - functions (a little mix)