Help in c++ program

Sir i don’t the problem with the code, but while i m executing it , it take first input correctly but while in second time of outside of while loop it is showing same input as first one.
If you are not understanding my problem then run the same code i am providing to you in codechef compiler Question is "Fancy Quotes " in beginner level.
Please explain me the problem and also tell me solution.
https://www.codechef.com/viewsolution/31528169

Did not read problem, solution completely. but at first glance I can see mistake at line no: 15. Why u are o/p string after read i/p. there is no such requirement.

put getchar(); after scanf. i/o will be read correctly.

Bro it’s “regularly fancy” not “regular fancy”. Also no need to print the string (line 15)