New course! Every coder should learn Generative AI!
Try a free lesson0
getline works but you have incorrect calculations to stop loop.. your inner while loop cant run anytime. And if l>0 not true true , your loop is infinite. . So think about logic in while loop..
c++ should be executed in every iteration..