12. The result of the following Code is :
Dim
N As Integer Dim S As Integer For N = 1 to 100 S=S +N Next
Label1.Text = S
a)
Displaying the numbers from 1 to 100.
b)
Displaying
the sum of the numbers from 1 to 100.
c)
Displaying the product of the numbers from 1 to 100.
Q
I
|
X
|
0
|
4.5*2 = 9
|
3
|
9*2 = 18
|
6
|
18*2 = 36
|
.13: Trace the following code segment, showing the value of
each variable each time it changes:
X
= 4.5
For
I = 0 To 7 Step 3
X
= X * 2
Next
Q.14:
Upon executing the following codes:
(H)
Value is …………...…..…..
(R)
Value is …………..………..
Q.15:
Third: Answer the following
1-
Specify the value of each variable after executing the following
Code.
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
Variable
|
Value
|
C
|
11
|
K
|
7
|
N
|
11
|
28