거기에 console.writeline (판매)을 입력하면 프로그램의 재고 주문 부분에 표시된 답변을 얻으려면이 코드에 무엇을 입력해야합니까? 한 가지는 내가 여러 물건을 판매용으로 입력 했더라도 마지막 거래를 저장하는 방법 (예 : 재고 주문 부분)입니다. 카운터와 관련이 있다고 생각하지만 기본적으로 저장 방법을 알아야합니다. 이전에 입력 된 정보가 끝에 표시됩니다.콘솔 응용 프로그램 VB, 모든 한 페이지에 답변을 표시 할 때 도움이 필요합니다
를 Sub 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'의 가치는 무엇입니까? –
'Sale'의 데이터 타입은 무엇입니까 – CurseStacker
재고 주문에는 아무런 가치가 없습니다. 재고 주문없이 프로그램을 실행하면 이전에 입력 한 정보를 단일 페이지에 저장하는 것이므로 문제가 없습니다. 여러 판매가있는 경우, 나는 단지 내가 입력 한 가장 최근 물건에 대한 재고 주문을 얻는다. 내가 추가 한 모든 것에 대해 추가해야 할 필요가있다. –