我正在尝试创建一个程序,该程序接受三个数字的输入,对它们进行平均,然后打印平均值。我到目前为止的代码:
Sub Main()
Dim Average As Double
Console.WriteLine("Please input first number:")
Dim Num1 As String
Num1 = Console.ReadLine()
Console.WriteLine("Please input second number:")
Dim Num2 As String
Num1 = Console.ReadLine()
Console.WriteLine("Please input third number:")
Dim Num3 As String
Num3 = Console.ReadLine()
Average = (Num1 + Num2 + Num3) / 3
Console.WriteLine("Your average is: ", Average)
Console.WriteLine("Press any key to exit")
Console.ReadLine()
End Sub
我输入三个数字,然后我的程序显示文本,“你的平均值是” 但是那里没有值;文本后只是空白。