Professional Documents
Culture Documents
DODING
What would be the output of the following code?
@@@@@
***
@@@@@
Learning Activity:
1. Write a console program that asks the user to enter two integers, obtain
the two integers, and print sum, product, difference, and quotient.
Module VBModule
Sub Main()
Dim num1, num2, num3,sum,difference,product As Integer
Dim quotient As Double
da = bs * 40 \ 100
hr = bs * 20 \ 100
gs = bs - (da + hr)
3. Write a program that asks the user to input the radius of a circle and
prints the circle’s diameter circumference, and area in the command
window.
Module VBModule
Sub Main()
Dim radius As Single = 0.0F
Dim area As Single = 0.0F
1. 40000
2. 4
3. 25
4. V
5. VB2013
Coding:
1. Write a set of statements that sum the even integers between 1 and 20
using For/Next Signature.
Module VBModule
Sub Main()
Dim i, j As Integer
j=0
For i = 1 To 20
If i Mod 2 = 0 Then
j=j+i
End If
Next
Console.Write(j)
End Sub
End Module
Learning Activity: