parse input from stdin
sample example for function "print_code" after parsing stdin