如果我把console.writeline(sale)放在那里,那么我需要在代码中输入什么才能获得答案,显示在程序的股票订单部分中在一件事情表明,即使我已经输入了多个东西出售,所以我如何保存以前的交易显示在最后,即股票订单部分,我认为这是与柜台做的事情,但现在基本上需要知道如何保存以前输入的信息显示在最后。控制台应用程序VB,在所有页面上显示答案时都需要帮助
子的Main()
Dim start As String
Dim Sale As String
Dim Receipt As String
Dim endProgram As String
Dim StockOrder As New list(Of String)
Console.WriteLine("Welcome, Let's start today's sales")
Console.WriteLine()
Console.WriteLine("please type 'Yes' or 'No', Yes to Start and No to Stop")
start = Console.ReadLine()
Do
If (start = "Yes") Then
Console.WriteLine("What have you sold today? and for how much? and Please input Code on the side of the item")
Sale = Console.ReadLine
StockOrder.Add(Console.ReadLine)
Console.Clear()
Console.WriteLine()
Console.WriteLine("Customer Receipt")
Console.WriteLine()
Console.WriteLine(Sale)
Console.WriteLine()
Console.WriteLine("Dear customer thank you for shopping with us, we appreciated your custom. please note that we have a 14 day return policy in which you can return faulty or unused and unopened items, if any product is returned without any fault please know that a 25% handling fee may apply, for any repair you have a three month warranty, this warranty only includes fault with the item replaced and any additional faults that occur will not be our responsibility.")
Receipt = Console.ReadLine
Console.Clear()
Console.WriteLine()
Console.WriteLine()
Console.WriteLine("Would You Like to Continue?")
start = Console.ReadLine
If (start = "No") Then
Console.Clear()
Console.WriteLine("Stock Order and Sales Sheet")
Console.WriteLine()
Console.Write(String.Join(Environment.NewLine, StockOrder))
For i = 0 To StockOrder.Count - 1
Console.WriteLine(StockOrder(i))
Next
End If
ElseIf (start = "No") Then
Console.WriteLine("Since you don't want to use the program nothing else will be ordered in the stock order")
Console.WriteLine("Thank you for using this program")
endProgram = Console.ReadLine
End
End If
Loop
End Sub
前端模块
你在问什么?此外,代码不会编译; 'StockOrder ='。 'StockOrder'的价值是什么? –
什么是'销售'的数据类型 – CurseStacker
股票订单没有价值,当我运行程序没有股票订单它运行良好我唯一的问题是将先前输入的信息保存到一个页面,所以如果我有多个销售,我只收到我输入的最近的东西的股票订单,我需要它为我添加的所有东西添加, –