the below program ends when a letter is input because any non numerical value is converted to 0. What if i want to be able to type in '0' and the program not to end . Can anyone help me out?
Code:int main(void) { char num[80] = {0}; int num1 = 0; do { cin >> num; num1 = atoi(num); cout << num << '\n'; }while(num1 != 0); return(0); }