learning if else in c++