Why did we use the cin.get before the loop ?
Explaination required
Hey
Just after the user enters input n, it presses enter key, cin.get() is used to absorb that extra character of newline,
if you don’t use cin.get(), (we know cin.getline() which reads till it encounters the first enter), the first cin.getline() in the loop will read that enter and thus a blank string, so it’s important to use cin.get()