-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask 9.VB
More file actions
35 lines (26 loc) · 703 Bytes
/
task 9.VB
File metadata and controls
35 lines (26 loc) · 703 Bytes
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
Module Module1
Sub Main()
Dim mystr1, mystr2, mystr3, mystr4, a, b As String
Dim c, d As Integer
d = 0
mystr1 = ""
mystr2 = ""
mystr3 = ""
mystr4 = ""
a = ""
b = ""
c = 0
Console.Write("please enter string: ")
a = Console.ReadLine
Console.Write("please enter string2: ")
b = Console.ReadLine
mystr1 = Left(a, 2)
mystr2 = Left(b, 2)
c = Len(a)
d = Len(b)
mystr3 = Mid(a, 3, c)
mystr4 = Mid(b, 3, d)
Console.WriteLine("result is: " & mystr2 & mystr3 & " " & mystr1 & mystr4)
Console.ReadKey()
End Sub
End Module