vb.net入门2:获取两个数字并相加

时间:2022-11-17 14:00:06
 Sub Main()
System.Console.WriteLine("欢迎云金杞来到VB.NET的世界")
Dim first, second, result As Integer
System.Console.WriteLine("请输入first的数字")
first = Console.ReadLine
System.Console.WriteLine("请输入second的数字")
second = Console.ReadLine
result = first + second
Console.WriteLine("两个数字的和")
Console.WriteLine(result)

End Sub

如上代码,主要是两个函数:

console.write()

console.read()