Home > Back-end > Can ask why must add this line to deal with non integer input code? Why not add other integer progra
Can ask why must add this line to deal with non integer input code? Why not add other integer progra
Time:12-09
Int getnights (void) { Int nights; Printf (" do enter the days you want to live: \ n "); While (the scanf (" % d ", & amp; Nights)! =1){ the scanf (" % s ");//handle the integer input Printf (" both Please enter an integer, sun as 2. \ n "); } Return nights; }