I have print n*(1/1+1/2+1/3.............1//n) but two test cases are not passed

i have taken everything in float but last two test cases are not passed in my best submission

use double instead of int …long double will be more appropriate
secondly print the answer to only two decimal places.
before printing the answer use
cout<<setprecision(2)<<fixed;

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.