Function of cin.get()

Why are we using cin.get() here?

@tejas_srivastava
after the input n, there will be a new line character, to avoid that new line character we use cin.get().