If the code is working, this question should be asked on
Code Review Stack Exchange. That said, any time you include the archaic DOS header
conio.h
, things are suspect. Then, you only ever need ONE
std::cout
for any single block of output no matter how many lines. That's what
'\n'
is for (or
std::endl
of you need it).
cls
doesn't. All it does is output a terminal full of newlines so it appears like the terminal was cleared, better to omit - your user knows what they just typed. More on Code Review. —
David C. Rankin 28 secs ago