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
tangare [24]
3 years ago
9

In Java please,

Computers and Technology
1 answer:
Bogdan [553]3 years ago
8 0

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Enter meal total: $");
  6.        double meal = input.nextDouble();
  7.        double finalAmount = meal + meal *0.09;
  8.        if(finalAmount * 0.15 > 8){
  9.            finalAmount = finalAmount + 8;
  10.        }else{
  11.            finalAmount = finalAmount + finalAmount * 0.15;
  12.        }
  13.        System.out.println("Final amount: $" + finalAmount);
  14.    }
  15. }

Explanation:

Firstly, create a Scanner object and print user to input total meal (Line 5-7). Next, add the 9% tax to the meal total (Line 8). Use an if statement to check if the finalAmount multiplied by the 15% of tips is bigger than 8 (Line 10), if so, only add 8 to the final amount (Line 11). If not, add 15% tips to final amount (Line 12). At last, print out the final amount (Line 15).

You might be interested in
Assume that a is an array of two or more integers, and that b and c are integers.
deff fn [24]

Answer:

B contains the highest value in the array

Explanation:

Such that the first if statement will execute and like wise the second if statement will execute thereby increasing the value of b

4 0
3 years ago
Does the security burden fall primarily on the user? On
liubo4ka [24]

Answer:

yes and no because of the security

Explanation:

yes and no because of the security

6 0
3 years ago
Placeholders can hold text but not graphics such as photos or charts. True or false?
sasho [114]
False. a placeholder can hold everything 
6 0
3 years ago
What does using indirect quotations allow a writer to do?
Marrrta [24]
Indirect quotations can add information that strengthens your content in many of the same ways as direct quotations so. Essentially, indirect quotes carry the meaning of a speaker or writer's original words without using the exact words.
7 0
3 years ago
Read 2 more answers
Instead of sending an entire file in one big chunk across the​ Internet, __________ is used which dices the file up into little
azamat

Answer:

TCP/IP

Explanation:

TCP/IP which stands for Transmission Control Protocol and Internet Protocol are network protocols which divide your message into smaller chunks or fragments known as network packets and sends them out onto the Internet. When the chunks arrive at the intended destination, TCP/IP on the receiving end reassembles the network packets into the original message.

TCP/IP are the main protocols used for sending data over the internet.

7 0
3 years ago
Other questions:
  • When pasting an object which has been copied from a different slide, where on the slide does the object paste, assuming nothing
    15·1 answer
  • You need to put cabling for connecting two new computers in a room, which did not have any network infrastructure. Because of th
    9·2 answers
  • _______ are unprocessed facts that a computer feeds on.
    5·1 answer
  • Information permanently stored on a hard disk, diskette, cd-rom disk, or tape, is called ________ storage.
    8·1 answer
  • What are ways to enter a formula in Excel? Check all that apply. Click on the Function Library group and select a function from
    10·2 answers
  • A simulation model includes: a. a description of the components of the system. b. a simulation clock. c. a definition of the sta
    8·1 answer
  • What is the correct order of headers, from left to right, in a completed frame?
    8·1 answer
  • Which of these are tools used to diagnose and test code? Check all of the boxes that apply.
    9·1 answer
  • What is Data rate?<br> What is BAUD RATE?<br> What is bandwidth?
    8·1 answer
  • How you use ict today and how will you use it tomorrow
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!