Can anybody please explain why I got wrong answer? (SIMPSTAT)

The simple program is giving wrong answer when I used “array of float” and as I changed it to “array of int” the It Gave correct answer, why so ?

PS :- This program requires to find the average of elements of some remaining element
after doing manipulation as given in question.

  1. Question Link :

  2. Correct Answer :

  3. Wrong Answer :

1 Like