simulate DOS with C(just for practice)