kaye
New member
- Joined
- Aug 10, 2011
- Messages
- 4
- Programming Experience
- Beginner
Hi! I am a VB.Net newbie and I'm a little lost with my codes. pls help me correct it. thank you :uncomfortableness:
here's my problem:

and here's the code i made: (the bold part seems to be the problem)
Module Module1
Sub Main()
Dim height As Integer
Dim base As Integer
Dim crosssection As Integer
Dim inertia As Integer
Dim section As Integer
Console.WriteLine("Enter base number:")
base = Val(Console.ReadLine())
Console.WriteLine("enter height number:")
height = Val(Console.ReadLine())
Console.Write("Lumber")
Console.Write(" crossection")
Console.Write(" inertia")
Console.WriteLine(" section")
Console.Write(base & "*" & height & " ")
crosssection = base * height
Console.Write(" ")
Console.Write(Math.Round(crosssection, 2))
inertia = base * (height ^ 3) / 12
Console.Write(" ")
Console.Write(Math.Round(crosssection, 2))
section = base * (height ^ 2) / 6
Console.Write(" ")
Console.Write(Math.Round(crosssection, 2))
'console.read()
Console.ReadLine()
End Sub
End Module
here's my problem:

and here's the code i made: (the bold part seems to be the problem)
Module Module1
Sub Main()
Dim height As Integer
Dim base As Integer
Dim crosssection As Integer
Dim inertia As Integer
Dim section As Integer
Console.WriteLine("Enter base number:")
base = Val(Console.ReadLine())
Console.WriteLine("enter height number:")
height = Val(Console.ReadLine())
Console.Write("Lumber")
Console.Write(" crossection")
Console.Write(" inertia")
Console.WriteLine(" section")
Console.Write(base & "*" & height & " ")
crosssection = base * height
Console.Write(" ")
Console.Write(Math.Round(crosssection, 2))
inertia = base * (height ^ 3) / 12
Console.Write(" ")
Console.Write(Math.Round(crosssection, 2))
section = base * (height ^ 2) / 6
Console.Write(" ")
Console.Write(Math.Round(crosssection, 2))
'console.read()
Console.ReadLine()
End Sub
End Module
Last edited: