Option Explicit On
Option Strict On
Module AnyDesk
Sub Main()
Dim desk As Double=200
Dim length As Double
Dim width As Double
Dim wood As String=""
Dim drawers As Double
Dim totalCharge As Double
Dim total As Double
Dim order As Double
'Customer enters order number
System.Console.Write("Order Number: ")
Dim orderString As String=Console.ReadLine()
order=Convert.ToDouble(orderString)
'enters length and width of given desk,if desk is over 750square inches add extra $50 to total
System.console.write("length of desk: ")
Dim lengthString As String=Console.ReadLine()
length=Convert.ToDouble(lengthString)
System.console.write("Enter width of desk: ")
Dim widthString As String=Console.ReadLine()
width=Convert.ToDouble(widthString)
If(length*width > 750) Then
totalCharge=+50
End If
'enters type of wood,2 type,mahogany or oak.pine is no extra charge
System.console.write("Enter type of wood: ")
Dim woodString=Console.ReadLine()
If wood="mahogany" Then
totalCharge=+150
'$150 added to the total charge
else if wood="oak" Then
totalCharge=+125
'$125 added to the total charge
End If
'enters how many drawers
System.console.write("Enter number of drawers: ")
Dim drawersString=Console.ReadLine()
'read number of drawers, each extra drawer adds $30 to total
If(drawers >=1) Then
totalCharge=+(30*drawers)
End If
'based on inputs add up the total charge
total=totalCharge+desk
System.console.write("Total Charge: "&total.ToString("c"))
End Sub
End Module
my total charge keeps coming as $200.00, doesn't matter what I put in,and that $200 is because the min for a desk is 200

New Topic/Question
Reply



MultiQuote




|