I have tried different conversions but after 45 minutes about out of ideas as to why when I run this prog I end up with 10,000.00% instead of 100.00%. As usual I searched format issues and percentage but turned up nothing relavent to me with in the first couple of pages.
Here is the code I'm using and the input i am using is 1 test to be graded and the grade is 100%.
VB Code:
Dim intCount As Integer = 1 Dim decTotal As Decimal = 0 Dim strNumOfTests As String Dim strTotalTests As String Dim intNumOfTests As Integer 'Display input box for the number of tests strNumOfTests = InputBox("How many tests need to be graded? " _ , "Number of tests", "5") intNumOfTests = CInt(strNumOfTests) Do Until intCount > CInt(strNumOfTests) strTotalTests = InputBox("Please enter the score for test # " _ & intCount.ToString, "Test Scores") intCount += 1 decTotal += CDec(strTotalTests) Loop 'Make the If statements that are going to provide 'a letter grade with the socre. If decTotal >= 90 Then lblAverageScore.Text = ("You scored " & FormatPercent(decTotal.ToString, 2) _ & " which is an A. Good Job!")
I know with in 5 minutes someone with far more experience then I have is going to nail this and make me look like an idiot but I'm willing to suffer the humiliation as long as I get an answer with a reason lol...
Later
Abe




Reply With Quote