Module Module1
Sub Main()
test1()
End Sub
Sub test1()
'資訊+圓面積+梯形面積
Console.WriteLine("008")
Console.WriteLine("abc")
Dim a, b, c, d As Integer
Dim e, f, g As Double
a = 10
b = 20
c = 50
d = 3.1415962658
e = a * a * d
Console.WriteLine("半徑10的圓面積:" & e)
f = b * b * d
Console.WriteLine("半徑20的圓面積:" & f)
g = c * c * d
Console.WriteLine("半徑50的圓面積:" & g)
Dim h, i, j, k As Integer
h = 16
i = 20
j = 32
k = (h + j) * i / 2
Console.WriteLine("梯形面積:" & k)
Console.Read()
End Sub
End Module
沒有留言:
張貼留言