what’s the purpose of cin.get() in the line 13
Why he used cin.get()
cin.get() is used for accessing character array. It includes white space characters. Generally, cin with an extraction operator (>>) terminates when whitespace is found. However, cin.get() reads a string with the whitespace.