It takes the amount of assignments you input, add's the total points received and you tell it the total points possible. It will add all the received, divide it over all possible, then with that number, display it as a percentage.
no, I mean, what is it printing that you think is wrong, for what input?
does it get the right answer for 1 assignment, and for 2?
an example of the problem helps spot the problem faster.
give me some values. I just ran it and it gave the right answer,
I did 60 out of 100, 40 out of 100, and it gave me 50 which is correct.
I also did 10 assignments 1-10 worth 10 points each and got the correct 55.
it seems fine to me.