Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
Add `cin.ignore();` after `cin >> b;` to discard '\n' after getting the choice and make the stream ready for the next cycle. Agregue `cin.ignore ();` después de `cin >> b;` para descartar '\ n' después de seleccionar y preparar la transmisión para el próximo ciclo.
5th Dec 2018, 6:05 AM
Babak
Babak - avatar