我试图获得价值,玻璃供应商希望找到一个程序来查找每块玻璃的重量。给定一块玻璃的面积和厚度,该程序必须找到以克为单位的重量并进行打印。玻璃的密度为2.7克/立方厘米。
Sub Main(ByVal args As String())
Console.WriteLine(vbCrLf + "Unit of volume?(Cubic centimetre) ")
Dim name = Console.ReadLine()
Dim x As Double = 2.7
Dim y As Double
x = y * 2.7
Console.WriteLine(" weight is {0}", y)
Console.Write(vbCrLf + "Press any key to exit... ")
Console.ReadKey(True)