Simple calculator written in c