vb.net - This is an assignment I have to turn in. I am missing something about the function calculation -


I have three test scores, the lowest score will be dropped. A function is used to calculate the final range and the grade has to be converted from a number to a letter. I have done everything I can and I am trying to ensure that the function is written correctly.

  'I put them in public class so that they could use the entire program in Deam Test 1 Double Dim Test 2 as Double Dim Test 3 string deep Result 1 as two slow students As the string function of the string deem total, as the semestergrad (Double double as double T, T2, double as TT2, as double-by-T3 double) as 'double function' test score And the lowest score calculation determines the drops that T 1 & lt; T2 and T1 and LT; T3 then total = CST (T2 + T3) / 2)) LSIF T2 and LT; T3 and T2 & LT; T1 then total = CSR (((1 Test 1 + Test 3) / 2)) LSIF T3 & LT; T2 and T3 & LT; T1 then total = CST ((T1 + T2) / 2) 'I have added it if the calculation for the statement was all the same because the program gave me the correct output LCEEF T1 = T2 and T2 = T3 will not give total = CST ((T1 + T2 + T3) / 3) End if 'it returns results from this function Return CDBL (Total) End Ceremony Private Sub BTN DataMalik (Sub-sender as System. Objects, By Valley A.Entreg) Handles BTA Ndityimine Click as a dime result as a string Click the string as it pulls the information from my text box test1 = CDbl (txtFirst.Text) test2 = CDbl (txtSecond.Text) test3 = CDbl (txtThird.Text) student = txtName.Text .toUpper 'This is how I use function calculation result = CST ((Semestergrad (test 1, test2, test3))' This number is to be converted to a letter if cdbl (total)> = 90 then Result1 = ("A") ElseIf CDbl (total)> = 80 then Result1 = "B" Other CDBL (Total)> = 70 N Par Secondly, if there is a result of the results of the result, the result of the result is 1. Student & amp; ":" & Amp; Result1 End Sub End Class  

The problem is that you are calling your function in a variable And compare another variable, change the part below and try again;

  'I use the function calculation result = (semestergrad (test 1, test2, test3)) Does it A. It is converted into a letter of points results> = 90 then Result1 = ( "A") ElseIfresult> = 80 then Result1 = "B" ElseIf results> = 70 then Result1 = "C" ElseIf results & gt; = 60 Then Result1 = "D" ElseIf Results & LT; 60 then result 1 = "F" end if  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -