So my program is suposed to prompt me for 5 integers. these 5 will be added together and produce an average I also need to put a Letter grade, in a label for the average of the 5 numbers.(this idk how to do)
these 5 must be between 0-100 and I'm just lost...i built a program like this before with weight loss but I'm aslo smashed with python can you guys help me out with where some errors are? I'm just crammed and i keep confusing the 2 languages that i'm just now learning.
Code:'Program Name: Grade Book 'Dev: Bryan Cruse 'Date:11/24/15 Option Strict On Public Class frmGradeBook Dim intGrades As Integer Dim IntNumberOFentries As Integer = 1 Dim StrGrades As String Dim decFinalGrades As Decimal Dim intMaxNumberOfEntries As Integer = 5 Dim StrInputMessage As String = "Please enter your grade" Dim StrInputHeading As String = "Grade Book" Dim StrNormalMessage As String Private Sub mnuExitProgramItem_Click(sender As Object, e As EventArgs) Handles mnuExitProgramItem.Click Close() End Sub Private Sub mnuClearGradesItem_Click(sender As Object, e As EventArgs) Handles mnuClearGradesItem.Click lstGrades.Items.Clear() End Sub Private Sub btnEnterGrades_Click(sender As Object, e As EventArgs) Handles btnEnterGrades.Click Dim strCancelClicked As String = "" StrGrades = InputBox("Please Enter your grades", "Grade Book", ) Do Until IntNumberOFentries > intMaxNumberOfEntries Or StrGrades = strCancelClicked If IsNumeric(StrGrades) Then intGrades = CInt(Convert.ToDecimal(StrGrades)) If intGrades > 100 Then MsgBox("Please enter a valid grade.", MsgBoxStyle.Exclamation, "Grade Book") If intGrades > 0 Then Else : MsgBox("You entered a non usable number", , "Input Error") End If lstGrades.Items.Add(intGrades) decFinalGrades += intGrades IntNumberOFentries += 1 StrInputMessage = strNormalMessage If IntNumberOFentries >= intMaxNumberOfEntries Then StrGrades = InputBox(StrInputHeading & IntNumberOFentries, StrInputHeading, " ") End If End If End If Loop lstGrades.Items.Add(intGrades) If IntNumberOFentries <= 5 Then lblScore.Visible = True decFinalGrades = CDec(intGrades / 7) If decFinalGrades <= 68 Then lblGrade.Text = "F" End If End If End While End Sub End Class





Reply With Quote
