+ 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

18th Aug 2019, 6:44 PM
Tanmay Bora
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
18th Aug 2019, 7:17 PM
daniel
daniel - avatar
0
It works fine for me. What are you expecting from it?
18th Aug 2019, 6:53 PM
Dlite
Dlite - avatar