Posted by Lee on Sunday, October 17, 2010 at 9:25am.
This questions is from Chapter 5, #54) Write a program to compute tips for services rendered. The program should request th person's occupation, the amount of the bill, and the percentage tip as input and pass this informaiton to a Sub procedure to display the person and the tip. I'm just little confused about what to do. Help!!
Computer Visual Basics 2008 - MathMate, Sunday, October 17, 2010 at 9:33am
Use input statements to get the requested items and store them in variables, the occupation should be stored in a string variable, the amount of the bill and the percentage could be in type decimal.
Write a sub procedure that accepts three arguments, namely the values input earlier, and display the person's occupation and the tip. You can calculate the tip by multiplying the bill amount and the percentage. If the bill comes to 50$ and the percentage is 15%, you would calculate 50*15/100=$7.50.
Post your pseudocode or your code for checking if you wish.
Computer Visual Basics 2008 - Lee, Thursday, November 4, 2010 at 5:30pm
This one is done, Than you so much MathMate, for solution it worked.
Computer Visual Basics 2008 - Anonymous, Tuesday, October 4, 2011 at 6:18pm
person occupation truck driver
amount of bill=$50
The tip =7.50
Computer Visual Basics 2008 - Anonymous, Saturday, October 17, 2015 at 5:53pm
Public Class frmGratuities
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Private Sub btnCompute_Click(sender As Object, e As EventArgs) Handles btnCompute.Click
Dim amount As Double = CDbl(txtAmount.Text)
Dim percent As Double = CDbl(txtPercent.Text)
Dim occupation As String = (txtOccupation.Text)
txtTip.Text = "Tip the " & occupation & " " & (amount * (percent / 100)).ToString("c") & "."
Answer This Question
More Related Questions
- Visual Basics 2008 - This is a from chapter 3 #82. the problem is: Write a ...
- computer science - write a program that calculates a customer's monthly bill. it...
- programming - write a program to calculate the amount of a server's tip given ...
- Computer - Write the program that will calculate and display the career ...
- computer programming - Write a fortran program to compute the geometric ...
- computer science - Write a program that will input an item’s wholesale cost and ...
- c programming - write a program that computes tax and tip on a restaurant bill ...
- Computer class - how do I design a program using a flowchart, the program needs ...
- computer science - Class scores: Write a program that calculates the total grade...
- computer science - write a program that prompts the user to input three numbers...