Advertisement
heysoul_sisypus

Grading System

Sep 4th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.     Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
  3.  
  4.     End Sub
  5.  
  6.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  7.  
  8.     End Sub
  9.     Dim q1, q2, cs1, cs2, cs3, exam As Integer
  10.     Dim totalq, totalcs As Integer
  11.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  12.         q1 = txtq1.Text
  13.         q2 = txtq2.Text
  14.  
  15.         totalq = ((q1 + q2) / 2) * 0.3
  16.         cs1 = txtcs1.Text
  17.         cs2 = txtcs2.Text
  18.         cs3 = txtcs3.Text
  19.  
  20.         totalcs = ((cs1 + cs2 + cs3) / 3) * 0.3
  21.  
  22.         exam = txtexam.Text * 0.4
  23.         Dim ave As Integer
  24.         ave = totalq + totalcs + exam
  25.  
  26.         lblave.Text = ave
  27.         If ave >= 75 Then
  28.             lblrmk.Text = "Passed!"
  29.         Else
  30.             lblrmk.Text = "Failed"
  31.         End If
  32.     End Sub
  33. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement