Pseudocode

Write pseudocode for a program that calculates a customer’s total price after tax. The program will ask the user for the price of the item they are buying. Then the program will add a 5% tax to the item and output the final price. So if I tell the program my item costs $20.00 the output will be: Your total after tax is $21.00

  1. 👍 0
  2. 👎 0
  3. 👁 1,317
  1. 20*1.05 = 21
    or do it the hard way
    20*1 + .05*20 = 20 + 1 = 21

    note use of distributive property to do it fast.

    1. 👍 0
    2. 👎 0
  2. I know how to add the sales tax I just need help with the pseudocode part

    1. 👍 0
    2. 👎 0
  3. This is what I have so far:

    Modular Pseudocode
    Main Module
    Declare firstNum as int
    Declare secondNum as float
    Declare sum as char
    Call User Input Module
    Call Calculations Module
    Call Output Module
    Welcome Module
    Write “Simple Multiplication”
    Write “Give me two numbers and I will multiply them!”
    Write “Simple Addition”
    Write “Give me two numbers and I will add them!”
    User Input Module
    Write “Please enter your first number.”
    Input 20
    Write “Please enter your second number.”
    Input .05
    Calculation Mode
    Set secondNum = 20 x .05
    Set sum = 20 + 1
    Output Module
    Write 20 + “plus” + 1 + “equals” + 21

    1. 👍 1
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. Programming

    Write a pseudocode to represent the logic of a program that allows a user to enter an hourly pay rate and hours worked. The program outputs the user's gross pay

  2. Programming concepts

    Develop a menu-driven program that inputs two numbers and, at the user’s option, finds their sum, difference, product, or quotient. top-down modular approach and pseudocode to design a suitable program to solve it. I am having

  3. Pseudocode

    Write an algorithm and pseudocode that represents a program that allows a user to enter two numbers. Your program should calculate the sum, difference (both directions), product, and quotient (both directions) of the two numbers.

  4. C++

    // Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert

  1. Programming

    Draw a flowchart or write pseudo code to represent the logic of a program that allows the user to enter values for the current year and the user’s birth year. The program outputs the age of the user this year. Preferably a

  2. Pseudocode

    Write an algorithm and pseudocode for A salesperson wants to write a program to calculate their gross monthly pay based on their annual salary, total sales, and commission rate. The program's output is the monthly pay calculated

  3. Programming

    Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of

  4. c programming

    a student designed a program to accept the age of an employee and then compute the employees retirement year and display the same in a statement on the screen required. a) write out the pseudo-code for the program above b) write

  1. Programming and Design

    Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program that prompts the user for a

  2. Java Programming

    I'm a beginner to Java and I need to know how to do the following: Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales

  3. CIS

    Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value. The program multiplies the value by 10 and outputs the result.

  4. programming

    Create the logic for a program that calls a method that computes the final price for a sales transaction. The program contains variables that hold the price of an item, the salesperson's commission expressed as a percentage, and

You can view more similar questions or ask a new question.