第1个回答 2012-10-22
Module Module1
Sub Main()
Dim FN As Decimal
Dim SN As Decimal
Dim sum As Decimal
Dim dec1 As Decimal
Dim dec2 As Decimal
Dim dec3 As Decimal
Try
Console.WriteLine("请输入第一个数:")
FN = Decimal.Parse(Console.ReadLine)
Console.WriteLine("请输入第二个数:")
SN = Decimal.Parse(Console.ReadLine)
sum = FN + SN
dec1 = FN - SN
dec2 = FN * SN
dec3 = FN / SN
Console.WriteLine("和:{0},差:{1},积:{2},商:{3}", sum, dec1, dec2, dec3)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Console.WriteLine("按任意键退出")
Console.ReadKey()
End Sub
End Module本回答被提问者和网友采纳