Académique Documents
Professionnel Documents
Culture Documents
2
3
String -1
Date -2
Boolean -3
String -4
: ( )Code:
:
-1 Radius Single
-2 X Single
: :
: ( )textbox1 arabic
.byte
: ( )textbox1.text
.computer
: ( )Code :
Try
Catch ex As Exception
EndTry
: ( )Code :
()Code
Din x As Single
Syntax Errors
Dim x As Single
Const x As Single
Syntax Errors
Const x As Single=10
: :
-1
'
REM -2
: ( )Code:
1
-1 UserName String UserBirthDate
Date UserGender Boolean UserTelNo
.Integer
.UserTelNo
: :
()3
()1
()4
()2
: :
(5+3)*2 -
11:
5+3*2 -
11:
: ( ) ( ) :
()1
()x
()2
.Dim
()
()3
()x
()4
()x
.
()5
.TextBox
()
: ( ) ( ) :
()1
( ) If..Then..else 2
()
()2
()
()3
& .
()
()4
( )Or ( )False
()5
( )Select Case
()1
( )x 15 ( )Y 350
(.)False
( )Else ( .)If
()8
( )and ( )true
()9
( )ListBox (.)SelectedIndex
()
()
()
()
(.)True
( )11 ( )Select..Case .
()
()
()
: ( )Code ( )R
" " ( )Textbox1
(.)R
Dim r,area as single
Const pi as single=22/7
R=me.textbox1.text
If r < 0 then
Msgbox ""
else
Area=2 * pi * r^ 2
Msgbox ("area of circle= " & area)
End if
Dim r , area as single
Const pi as single=22/7
R=me.textbox1.text
If r >= 0 then
Area=2 * pi * r^ 2
Msgbox ("area of circle= " & area)
else
Msgbox ""
End if
) Code( :
:)Textbox1(
( )Label1 (:)Textbox1
30
84
64.4
-33
1 111
114.3
1 111
: ( )y=3x+2
( )TextBox ( )Runtime Error
" "
Dim x, y As Single
If IsNumeric(Me.TextBox1.Text)Then
x = Me.TextBox1.Text
y = 3 * x + 2
Label1.Text = y
Else
)" "(MsgBox
End If
Dim x, y As Sing
If Not (IsNumeric(Me.TextBox1.Text))Then
MsgBox(")"
Else
x = Me.TextBox1.Text
y = 3 * x + 2
Label1.Text = y
End If
: :
One
True
Youssif
Ahmed
7X9=63
Second .
:
:
.1
Do while Loop:
.
( )Code True
True
False
-1 ( )For...Next Next
.
-2 :
.
Do While
For Next
Select Case
-3 ( )Code ( )txt_display:
.
241811
2345178911
11
-4 ( )Code ( )lbl_display:
.
11
11
-5 ( )Code ( )lbl_display:
.
11
15
: ( ) ( ) :
()1
()
()2
()
()3
( )Step ( )For...Next
()
()4
()
()5
.
( )Do...While
()
: ( )r ( )Code :
( ) 0.5 1 1.5
( 0
) Overflow 2
( 0
11
) 10 5
: ( ) ( ) :
()1
( )Procedure .
()
()2
( )Predefined .
()x
()3
( )Area ( )Single
()x
( )Parameters ( )Procedure
()
(.)Procedure
()5
( )Sub ( )Functions
()x
.
()1
( )Sub ( )Function .
()
()7
( )Procedures
()x
(.)Parameters
()8
( )Procedure ( )Variable
( )Constant (.)Function
: () ():
()
()
( )1 ()Sub
( )2 ()Function
( )3 ()Variables
( )4 ()Constants
.
.
12
()
: ( )Code:
-1 ShowOddOrEven :
-2 Start : Integer
: ( )Code:
-1 .Area:
-2 .Radius:
-3 .res:
-4 :
- Single : .Area
- Single : .Radius
- Single : .Res
13
: ( )Code:
-1 .Sum :
-2 .First,Second :
-3 .total :
-4 :
- Single : .Sum
- Single : .First,Second
- Single : .Total
: ( )Sub (:)Function
ShowOddOrEven Sub
14
Area Function
-
IsNumeric Function
: ( )Functions ( )Code:
Show -1
Factorial -2
15
: ( ) ( )x :
.1
)( .
)x( .
.2
.3 )( .
.4
)( .
: ( ) :
.1 )( .
.5 ) ( .
.2 )( .
.3 ) ( .
.4 )( .
.5 )( .
: .
- ()Exclusion
16
()1
: ( ) ( ) :
()1
If..Then..Else .2
()
()2
& .
()
()3
X=5 Y 7
()
( )Procedures .
()
()5
Dim (. )Variables
()
: :
3.5 -
35 -
Case Is < 8 -
Case 1 To 6, 8 -
Case Is >= 4-
-2 Select False :8
-3 ( )Code :
Do While...Loop -
If End If -
For...Next -
-4 lblOut ( )Code:
2 -
2,3,4,5,6,7,8,9,10 -
-5 (:)Constants
Dim i as Integer
For i = 2 To 10 Step 2
"lblOut.Text = lblOut.Text & i & ",
Next
2,4,6,8,10 -
- .
- .
- .
17
: :
-1 ( )Code:
11
11
Dim N, K, C As
Integer
C = 10
For N = 1 To 10 Step
5
K = K + N
Next
If N >= C Then
C = C + 1
End If
-2
( )3 .
( )1 .
( )4 .
( )2.
-3 ( )Code:
1
2
( )Code
-1 ( )Total, FirstNumber, SecondNumber Decimal
-2 ( )FirstNumber, SecondNumber
( )FirstNumber, SecondNumber Total
18
()2
: ( ) ( ) :
()1
If..Then..ElseIf .
()
()2
()
.
()3
Or False
()
()4
Select Case .
()
()5
()
.False
: :
-1 )( AddSum :
X=Y+AddSum() -
AddSum()=X+Y-
X=AddSum()-
-2 A=2 :
Do While (a = 2)-
-3 :
Dim J As Byte
For J=1 to 500 Step 3
) ListBox1.Items.Add( J
Next
- DoWhile ForNext
-
19
-5 2 - (7+2) * 2
14 -
-16 -
5 -
: :
-1 SelectCase
Dim x As Integer
x = Me.textbox1.text
If x = 0 Then
" = label1.text
"
End If
If x > 0 Then
" = Label1.Text
" End If
If x < 0 Then
" = Label1.Text
" End If
Select Case x
Case 0
" " = Label1.Text
Case Is > 0
" " = Label1.Text
Case Is < 0
" " = Label1.Text
End Select
21
-2 () ()
()
()
-1
()Sub
-2
()Function
-3
()Variables
-4
()Constants
.
.
-3 ( )Code
()Code
Dim x As Sangle
Const x As Integer
Syntax Errors
Dim x As Single
X=10
21
()3
: ( ) ( ) :
()1
SelectedIndex .ListBox
()
()2
Select..Case .
()
()3
()
()4
()
()5
()
: :
- :
-1 ( )Code :
Dim N As Integer
Dim S As Integer
For N = 1 to 100
S=S +N
Next
Label1.Text = S
- 1 111
- 1 111
- 1 111
-2 ( )Label1 :
Dim intNum as Integer = 10
intNum= intNum+2
intNum = intNum Mod 3
Label1.Text = intNum
3-
0-
4-
-3 A< > 2 :
Do While (a = 2)-
22
- ( )Sub (:)Function
-
Concatenating Function
ShowResult Sub
: :
-1 ( )Code:
:
x=0, z=0, j=1, k=1, y=2
IF x < y Then
z=K+J
x=x+1
y=y-1
Else
z=K-y
x=x+2
y=y-2
End IF
-2 ( )Code:
-1 .Calc :
-2 .fn,sn :
-3 .res:
-3 :
- Single : .Calc
- Single : .fn,sn
- Single : .Res
23
-3 ( )Code :
: ( )textbox1 arabic
.byte
: ( )textbox1.text
.computer
24