Use of cin.get();

What is the use of cin.get() in the above code? Please explain

hello @jayasmit98

The use of cin.get is to read whitespace charachters such as space or tab which cin >> cannot read.