Computer Visual Basics 2008

posted by .

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 -

    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 -

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

  • Computer Visual Basics 2008 -

    person occupation truck driver
    amount of bill=$50
    The tip =7.50
    end sub

  • Computer Visual Basics 2008 -

    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

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. computer science

    write a program that calculates a customer's monthly bill. it should input customer name, which package the customer has purchased, and how many hours were used. it should then create a bill that includes the input informtion and the …
  2. computer science

    Write a program that will input an item’s wholesale cost and its markup percentage. The program will output the item’s retail price. The program should repeat for several input values. For example, if an item cost is 5.00 and markup …
  3. Visual Basics 2008

    This is a from chapter 3 #82. the problem is: Write a program to calculate the amount of a server's tip given the amount of the bill and the percentage tip obtained via imput dialog boxes. The output should be a complete sentence that …
  4. programming

    write a program to calculate the amount of a server's tip given the amount of the bill and the percentage tip ovtained via input dialog boxes. The output should be a complete sentence that reiterates the inputs and gives the resulting …
  5. computer science

    write a program that prompts the user to input three numbers. The program should then output the numbers in nondescending order.
  6. Computer

    Write the program that will calculate and display the career statistics for a hockey player. The program must be written in Visual Basic 2008 console application.
  7. Computer class

    how do I design a program using a flowchart, the program needs to compute state and county sales tax?
  8. computer science

    Class scores: Write a program that calculates the total grade for N classroom exercises as a percentage. The user should input the value for N followed by each of the N scores and totals. Calculate the overall percentage (sum of the …
  9. computer programming

    Write a fortran program to compute the geometric information for a kite. The program should read the a, c and p lengths and compute the q length
  10. c programming

    write a program that computes tax and tip on a restaurant bill for a patron with rs.44.50 per meal charge.the tax should be 6.75 percent of the meal cost.the tip should be 15 percent of the total after adding the tax.display the meal …

More Similar Questions