Not getting correct output

I have made the sum double , but still in output if there don’t exists any values after the decimal , then my code is returning int for that value , however i want decimal upto 4 places may it be 0’s for each average value, and that’s why my code is not getting submitted ,so how can i do that?
Code link :- https://drive.google.com/file/d/11MTpoJCqPrhlf188fBGj6hIxGVOspV57/view?usp=sharing

Hey @saksham_thukral
Use this
cout << fixed << setprecision(4)<<output;
UPDATED HERE

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.