int percent = (score/numberOfQuestions)*100;
progressText.setText(score+\"/\"+numberOfQuestions+\" \"+percent+\"%\");
returns 0% no matter what I
You need to cast on either of them: -
float percent = ((float)score/numberOfQuestions)*100;
Since, 5 / 10
is already 0.. Casting the final result to any type will give you 0 only, as in below code: -
float percent = ((float)(score/numberOfQuestions))*100;
This will also give you 0.0
. Since you are casting 0
to float. Doesn't matter..