Use of cin.get()

what is the use of cin.get() function in this code?

@ennayawalia06 It is not necessary if you code on ide.
Refer this http://www.cplusplus.com/forum/general/465/