Please take a look at the following code and tell me why skillPercentange is always Zero:
NSInteger skillPercentange;
skillPercentange=totalCorrectAns * reloader/100;
I don't know exactly what you want to do, but I'll try to show you a demo:
int allQuestions = 50;
int correctAnswers = 25;
float precentage = (100 * correctAnswers)/allQuestions;
NSLog("%i of %i questions answered correctly. That are %.1f percent!",correctAnswers,allQuestions,precentage);
Output: "25 of 50 questions answered correctly. That are 50.0 percent!"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With