Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Algorithm solution (in pseudocode): Total = Price x (1 + Taxes) 100 To solve this problem your program must perform the following tasks: Declare variables

image text in transcribed
Algorithm solution (in pseudocode): Total = Price x (1 + Taxes) 100 To solve this problem your program must perform the following tasks: Declare variables named price, tax, and total that hold single precision real numbers. Prompt the user to "Enter the price and tax (%) please: ". Read the values from the keyboard and store them in price and tax respectively. Calculate the total cost using the expression shown above and assign the resulting value to total. Round the value of total to ONE decimal digit and reassign the rounded value to total Format the output to display the values in fixed format with two decimal digits. Print a message like the one below: "For a price $", P, "and ", X "% tax, the total cost of the product is $", T where P, X, and T are the values corresponding to variables price, tax, and total respectively. Note: ensure your expression does not use mixed data types by defining your literal values appropriately (pay attention to the data type of the variables you are using in the expression)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions

Question

1 How should this product be marketed?

Answered: 1 week ago