هلا نعتز فيكم يا اخواننا العرب واسال الله ان يزيدنا واياكم علما
انا مبتدي فالبرمجه وحاولت احل الخوارزميه هذه
وكتبت الكود
ولكن عند التنفيذ ياتيني مشكله
.InvalidCastException
Conversion from string "P" to type 'Integer' is not valid.
هذا الكود
ule Module1
Dim T As Integer
Dim A, B, C, D, P As String
Sub Main()
T = 0
For Z As Integer = 0 To 100
Exit For
Next
If T >= 90 Then
Print("A")
ElseIf T >= 80 Then
Print("B")
ElseIf T >= 70 Then
Print("C")
ElseIf T >= 60 Then
Print("D")
ElseIf T >= 0 Then
Print("P")
End If
علما ان الخطا ياتي عند اخر امر طباعه
وهذه الخوارزميه
Write an algorithm that reads a student’s score out of 100 and prints his grade
according to the following:
Score Grade
0 – 59 F
60 - 69 D
70 – 79 C
80 – 89 B
90 – 100 A
وارجو النصيحه كيف اتعلم الخوارزميات والبرمجه عموما
والف شكر