TestCase 4, 5 are failing

Link to the code : https://ide.codingblocks.com/s/233095
Thanks!

@18bcs036
I think there is mistake in line no. 11, It should be sum = a[i]*t;

Still it’s failing testcase 4 and 5

Thanks for your help! I have solved this.