Dim sCoach as integer = 550
Dim sTicket as integer = 30
Dim nPaidMoney as integer
Dim nTotalCost as integer
Console.Writeline("Enter the estimated number of student going on the trip")
nStudents = Console.ReadLine()
If nStudents <= 0 or nStudents > 45
Do until nStudents > 0 and nStudents < 46
Console.Writeline("Please enter a valid number")
nStudents = Console.ReadLine()
nFree =(nStudents \ 10) * sTicket
nTotalCost = sCoach + (sTicket * nStudents) - nFree
rPrice = nTotalCost / nStudents
Console.WriteLine("The recomended price for the trip is at least $" & Math.Round(rPrice, 0) & " per student")
Console.Writeline("Enter the name of the student, if finished enter 'finished'")
sNames(i) = Console.Readline
Console.Writeline("Have they paid?")
nPaid(i) = Console.Readline
If nPaid(i) <> "Yes" or nPaid(i) <> "No" or nPaid(i) <> "no" or nPaid(i) <> "yes"
Do until nPaid(i) = "Yes" or nPaid(i) = "No" or nPaid(i) = "no" or nPaid(i) = "yes"
Console.WriteLine("Please enter 'Yes' or 'No'")
nPaid(i) = Console.Readline
If nPaid(i) = "Yes" or nPaid(i) = "yes"
Console.WriteLine(sNames(i) & " " & nPaid(i))
nFree =(nStudents \ 10) * sTicket
nTotalCost = sCoach + (sTicket * nStudents) - nFree
Console.WriteLine("The overall cost of the trip will be $" & nTotalCost)
Console.Writeline("The overall amount paid was $" & nPaidMoney * rPrice)
If nTotalCost - rPrice * nPaidMoney < 0
Console.WriteLine("The school will earned $" & (nTotalCost - rPrice * nPaidMoney) * -1)
Else if nTotalCost - rPrice * nPaidMoney > 0
Console.WriteLine("The school will make a loss of $" & Math.Round(nTotalCost - rPrice * nPaidMoney, 2))
Console.WriteLine("The school will make no profit or loss")