Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Execution Program
Module Module1
Sub Main()
Dim n, r As Integer
Console.Write("Enter a number:")
n = CInt(Console.ReadLine())
Console.Write("Reverse number is...:")
While n <> 0
r = n Mod 10
Console.Write(r)
n = n \ 10
End While
Console.ReadKey()
End Sub
End Module
Module Module1
Sub Main()
Dim num As Integer, i As Integer, count As Integer
Console.WriteLine("Enter a number:")
num = Console.ReadLine()
For i = 1 To num Step 1
If (num Mod i = 0) Then
count = count + 1
End If
Next
If count = 2 Then
Console.WriteLine("Number is prime")
Else
Console.WriteLine("Number is not prime")
End If
Console.ReadKey()
End Sub
End Module
End Module
* *
* * * *
* * * * * *
Module Module1
Sub main()
Dim i, j, k, m, l As Integer
m = 5
l = 1
For i = 1 To 4 Step 1
If m <= 3 Then
m = m - 1
End If
For j = 1 To m Step 1
Console.Write(" ")
Next
For k = 1 To l Step 1
Console.Write("* ")
Next
l = i * 2
m = m - 1
Console.Write(vbNewLine)
Next
Console.ReadLine()
End Sub
End Module
Q5. To calculate the binary number from decimal number.
Module Module4
Sub main()
Dim dec, remainder, m, sum As Integer
m = 1
End While
Module Module1
Sub main()
Dim a(5) As Integer, i As Integer, max As Integer
Console.Write("Enter the 5 elements")
For i = 0 To 4 Step 1
a(i) = Console.ReadLine()
Next
Console.Write("Array Elements" & vbNewLine)
For i = 0 To 4 Step 1
Console.WriteLine(a(i))
Next
max = a(0)
For i = 0 To 4 Step 1
If a(i) > max Then
max = a(i)
End If
Next
Console.Write("Max No=" & max)
Console.ReadLine()
End Sub
End Module
Module Module1
Sub Main()
End Module
Q8 Write an algorithm, draw a flowchart and develop a VB.NET windows application to check the user id
and password is valid or not.
Q10. Write an algorithm, draw a flowchart and develop a VB.NET windows application to create
notepad.
End Sub
End Class