-
Notifications
You must be signed in to change notification settings - Fork 0
/
Module1.vb
45 lines (37 loc) · 1.05 KB
/
Module1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Imports System.IO
Imports System
Imports System.IO.File
Module Module1
Sub Initial_menu()
Dim initial_menu_items() As String = {"restuant menu", "binary conversion", "types of gates demonstration", "random number generator"}
Dim i As Integer = 0
Dim userinput As Integer
Console.Clear()
Console.WriteLine("--------Inital Menu--------")
For Each item In initial_menu_items
Console.WriteLine(i & ": " & item)
i += 1
Next
Console.WriteLine("Please enter your selection")
Try
userinput = Console.ReadLine()
Catch ex As Exception
Exit Sub
End Try
Select Case CInt(userinput)
Case 0
Run_resturant_menu()
Case 1
Run_convert_number()
Case 3
Run_random_number_gen()
Case Else
Return
End Select
End Sub
Sub Main()
While True
Initial_menu()
End While
End Sub
End Module