IF Then Else True if Then Else End
- Slides: 22
IF. . Then. . Else True • รปแบบ if เงอนไข Then ชดคำสงเมอเงอนไขเป นจรง Else End if ชดคำสงเมอเงอนไขไ มเปนจรง Dim Dis. Count as double Dim Total as double Total = 150000 if Total > 30000 Then Dis. Count = Total*0. 15 Else Dis. Count = Total*0. 05 End if condition Statement 1 False Statement 2 Statement 3 ��� �. �. �������� 30000 �������������� 15% ������� 30000 ���
IF. . Then. . Else. IF (ตอDim) Score as Integer Dim Grade as String Score = Val(Txt. Score. Text) IF Score >= 80 Then Grade = “A” Else. IF Score >=75 Then Grade = “B+” Else. IF Score >=70 Then Grade = “B” Else. IF Score >=65 Then Grade = “C+” Else. IF Score >= 60 Then Grade = “C” Else. IF Score >= 55 Then Grade = “D+” Else. IF Score >= 50 Then Grade = “D” Else Grade = “F” End IF Lb. Result. Text =Grade
Select. . Case (ตอ ) �. �. ������������ �. �. ������ Select Case Dim score As Integer Dim Grade As String score = Txt. Score. Text Select Case Val(score) Case Is >= 80 Grade = "A" Case 75 To 79 Grade = "B+" Case 70 To 74 Grade = "B" Case 65 To 69 Grade = "C+" Case 60 To 64 Grade = "C" Case 55 To 59 Grade = "D+" Case 50 To 54 Grade = "D" Case 0 To 49 Grade = “F" End Select Lb. Result. Text = Grade
For … Next • ต. ย. จงเขยนโปรแกรมเพอหาคา. . . 100 Dim i as integer Dim Sum as integer For i = 1 to 100 Sum = Sum + i Next i Label 1. Text = Sum ผลรวมของ 1 + 2 + 3
For … Next • ต. ย. จงเขยนโปรแกรมเพอหาคา 3 + 5 + 7. . . 99 Dim i as integer Dim Sum as integer For i = 1 to 100 Step 2 Sum = Sum + i Next i Label 1. Text = Sum ผลรวมของ เลขคตงแต 1+ For i = 1 to 100 Step 2
For … Next • ต. ย. จงเขยนโปรแกรมเพอหาคา ผลรวมของ เลขคตงแต 2 + 4 + 6 + 8. . . 100 Dim i as integer Dim Sum as integer For i = 2 to 100 Step 2 Sum = Sum + i Next i Label 1. Text = Sum For i = 2 to 100 Step 2
While … End While • ต. ย. Dim i as integer Dim Sum as integer While i <= 100 ������� Sum = sum + i �������� i = i+1 �������� End While ��������������� Message. Box. Show(Sum) �while ���
- Three of a kind all letting fly
- Elseif pascal
- Delphi ifthen
- When else vhdl
- If then else
- If else pseudocode
- Pseudo code app
- Ibm cognos if then else statement examples
- If then else pseudocode and flowchart
- If then else scratch
- True or false true or false
- Chapter 2 jesus christ true god and true man
- True end artery
- End to end delay
- Front end of a compiler
- End-diastolic volume vs end-systolic volume
- End to end argument in system design
- End to end
- Compiler front end back end
- End to end accounting life cycle tasks
- Comet transformer
- Kolondivertikulose
- End to end delay