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!!

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.

This one is done, Than you so much MathMate, for solution it worked.

person occupation truck driver

amount of bill=$50
The tip =7.50
end sub

Public Class frmGratuities

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

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") & "."

End Sub
End Class

Of course! I can help you with that.

To write a program that computes tips for services rendered, you can follow these steps:

1. Start by defining your program structure. In this case, you need a Sub procedure to handle the calculations and display the information.

2. In the main program body, prompt the user for their occupation, the amount of the bill, and the desired percentage tip. You can use input statements or a user interface to collect this information.

3. Pass the occupation, bill amount, and tip percentage to the Sub procedure defined in step 1.

4. In the Sub procedure, calculate the tip amount using the bill amount and the tip percentage. You can use the formula `tip amount = bill amount * (tip percentage / 100)` to calculate the tip amount.

5. Display the person's occupation and the calculated tip amount.

Now, let's look at some example code to illustrate these steps:

```python
# Step 1: Define the Sub procedure
def display_tip(person, tip_amount):
print("Person:", person)
print("Tip Amount:", tip_amount)

# Step 2: Prompt the user for input
occupation = input("Enter the person's occupation: ")
bill_amount = float(input("Enter the amount of the bill: "))
tip_percentage = float(input("Enter the tip percentage: "))

# Step 3: Pass input to the Sub procedure
display_tip(occupation, bill_amount * (tip_percentage / 100))
```

In this example, we define a Sub procedure called `display_tip` that takes the person's occupation and the tip amount as parameters. We prompt the user for input using the `input` function, convert the bill amount and tip percentage to float values, and then pass the values to the `display_tip` procedure along with the calculated tip amount.

Feel free to modify this code to suit your needs and add any additional functionality or error handling that may be required. I hope this helps you understand how to approach this programming task!