+ 2
Why is this Program not giving expected output?
This program calculates the percentage (per) and from decides in which division will the student go https://code.sololearn.com/cLvBD6lI2jza/?ref=app
2 Answers
+ 1
You divide by 100 and after then multiply by 500 (line 8).
If sum > 100 ==> per > 500.
If sum < 100 ==> sum=0 ==> per=0
0
It works fine for me.
What are you expecting from it?