why it make dead circle when i input other characters to "n"? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

why it make dead circle when i input other characters to "n"?

i make a code input different data into a file but i make dead circlr if i input "a " at first https://code.sololearn.com/c7sBQz5SH234/?ref=app

21st Sep 2017, 12:37 PM
learnlearnlearn
learnlearnlearn - avatar
2 Antworten
+ 4
cin>>n doesn't set n if there isn't a number typed. Try validating number like I did in here https://code.sololearn.com/cF7iOkU73BYy/?ref=app
22nd Sep 2017, 12:28 PM
John Wells
John Wells - avatar
0
thanks a lot
22nd Sep 2017, 12:33 PM
learnlearnlearn
learnlearnlearn - avatar