1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
devlian [24]
3 years ago
8

Write a program that computes the tax and tip on a restaurant bill for a patron a $88.67 meal charge. The tax should be 6.75 per

cent of the meal cost. The tip should be 20 percent of the total after adding the tax. Display the meal cost, tax amount, tip mount, and total bill on the screen.
Computers and Technology
1 answer:
Lina20 [59]3 years ago
5 0

Answer:

C++ code is writtern below with explanation in comments

Explanation:

#include <iostream>

using namespace std;

int main()

{

//declare all the required fields in double format

   double mealCost =88.67;

   double taxPercenatage=6.75;

   double tipPercentage=20;

// displaying the original Meal Cost

   cout<< "Meal Cost: "<<mealCost<<endl;

// get the total tax percentage from meal cost

   double totalTax= taxPercenatage /100 * mealCost;

// display the tax amount

   cout<< "Tax Amount: "<<totalTax<<endl;

// getting tip amount from meal cost and tax amount.

   double totalTip = tipPercentage/100 * (mealCost+totalTax);

//displaying tip amount

   cout<< "Tip Amount: "<<totalTip<<endl;

// now adding all three values and get total amount that customer

// has to pay

   double totalAmount = mealCost+totalTax+totalTip;

//Displaying total amount

   cout<< "Total Bill: "<<totalAmount<<endl;

   return 0;

}

Output

Meal Cost: 88.67

Tax Amount: 5.98523

Tip Amount: 18.931

Total Bill: 113.586

You might be interested in
A robot worker and a human worker are both vulnerable to
Lady bird [3.3K]

Answer:

fire

Explanation:

4 0
3 years ago
In the simulation, player 2 will always play according to the same strategy. The number of coins player 2 spends is based on wha
baherus [9]

The simulation, player 2 will always play according to the same strategy.

Method getPlayer2Move below is completed by assigning the correct value to result to be returned.

Explanation:

  • You will write method getPlayer2Move, which returns the number of coins that player 2 will spend in a given round of the game. In the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on.

#include <bits/stdc++.h>  

using namespace std;

bool getplayer2move(int x, int y, int n)  

{

   int dp[n + 1];  

   dp[0] = false;  

   dp[1] = true;  

   for (int i = 2; i <= n; i++) {  

       if (i - 1 >= 0 and !dp[i - 1])  

           dp[i] = true;  

       else if (i - x >= 0 and !dp[i - x])  

           dp[i] = true;  

       else if (i - y >= 0 and !dp[i - y])  

           dp[i] = true;  

       else

           dp[i] = false;  

   }  

   return dp[n];  

}  

int main()  

{  

   int x = 3, y = 4, n = 5;  

   if (findWinner(x, y, n))  

       cout << 'A';  

   else

       cout << 'B';  

   return 0;  

}

8 0
3 years ago
What is displayed on the console when running the following program?
Andre45 [30]

Answer:

The answer is "Option A"

Explanation:

In the given java code, a class "Test" is defined, inside the main method try and catch block is used, inside the try block method "p()" is called, that print a message. in this block two catch block is used, that works on "NumberFormatException" and "RuntimeException".  In the method "p" declaration, a string variable "s" is defined, that holds double value, that is "5.6", and converts its value into the wrong integer, and other wrong option can be described as follows:

  • In option B, it is wrong, it is not followed by after call method.
  • In option C, It is not followed by runtime exception, that's why it is incorrect.
  • Option D and Option E both were wrong because they can't give run time and compile-time error.  
6 0
3 years ago
Which type of mountain is formed due to the collision of two different kinds of plates?
Lyrx [107]
D) Andean mountains are formed due to the collision of two different kinds of plates.
6 0
3 years ago
Read 2 more answers
The main workspace of a Windows computer is called the______
andrew11 [14]

Answer:

Desktop

Explanation:

8 0
3 years ago
Other questions:
  • If an ARQ algorithm is running over a 40-km point-to-point fiber optic link then:
    12·1 answer
  • Greg works for online games development company. He occasionally visits online literature sites and downloads e-books of his cho
    12·2 answers
  • Renee is creating a multimedia presentation for a website that requires user interaction. Which multimedia type is Renee using?
    5·2 answers
  • The interaction between information technology and organizations is influenced___________.A) solely by the decision making of mi
    12·1 answer
  • A media strategy that involves high ________ most likely involve creating broad exposure using many media vehicles, while a stra
    15·1 answer
  • What is a algorithm design ​
    11·1 answer
  • Differentiate between perfect and imperfect market​
    14·1 answer
  • 0111101101010110101110110001001011101001011101101010101010110101
    14·1 answer
  • What option would fit the most content on a page?
    10·1 answer
  • write a program that computes an integer's checksum. to compute the checksum, break the integer into its constituent
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!