Answer to Question #187744 in Visual Basic for tafadzwa

Question #187744

a patron needs an application to calculate the tip and final bill amount for a restaurant bill. accept the bill amount 129,50 and tip percentage 10%.

calculate the tip amount and final bill of the patron and then display it


1
Expert's answer
2021-04-30T23:35:34-0400
Module Module1


    Sub Main()
        'get the bill amount
        Console.Write("Enter the bill amount: ")
        Dim billAmount As Double = Double.Parse(Console.ReadLine())
        'Calculate the tip
        Dim tip As Double = billAmount * 0.1
        'Calculate the final bill
        Dim finalBill As Double = billAmount + tip
        'display the tip
        Console.WriteLine("The tip(10%): {0} USD", tip)
        'display the final bill
        Console.WriteLine("The final bill: {0} USD", finalBill)


        Console.ReadLine()
    End Sub


End Module

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS