Answer:
Following is given the solution of your question as required.
All the necessary descriptions are given in form of comments,
Sample output are also shown.
I hope it will help you!
Step-by-step explanation:
6.5m questions
8.7m answers