juggernot Well-known member Joined Sep 28, 2006 Messages 173 Programming Experience Beginner Oct 7, 2006 #1 does anyone know how i would calculate a score? I have 6 questions right now, and I was wanting it to calculate the percent you had right.
does anyone know how i would calculate a score? I have 6 questions right now, and I was wanting it to calculate the percent you had right.
JuggaloBrotha VB.NET Forum Moderator Staff member Joined Jun 3, 2004 Messages 4,530 Location Lansing, MI; USA Programming Experience 10+ Oct 9, 2006 #2 Percent = CorrectAnswers / TotalQuestions plug in your variables in the correct spots and there ya go Upvote 0 Downvote
Percent = CorrectAnswers / TotalQuestions plug in your variables in the correct spots and there ya go
vis781 Well-known member Joined Aug 30, 2005 Messages 2,016 Location Cambridge, UK Programming Experience 5-10 Oct 9, 2006 #3 VB.NET: Percent = (CorrectAnswers / TotalQuestions) * 100 Upvote 0 Downvote
cjard Well-known member Joined Apr 25, 2006 Messages 7,081 Programming Experience 10+ Oct 9, 2006 #4 When working with small floating point numbers, I normally do: Percent = (CorrectAnswers * 100) / TotalQuestions It avoids information loss caused by underflow If working with very large numbers, I use vis' method - this time to help avoid overflow. In your case, either will suffice Upvote 0 Downvote
When working with small floating point numbers, I normally do: Percent = (CorrectAnswers * 100) / TotalQuestions It avoids information loss caused by underflow If working with very large numbers, I use vis' method - this time to help avoid overflow. In your case, either will suffice