I need help with this program. I need code for this . Java if statements Determine the amount of discount a person should receive. If the bill is more than 2000, then the person should receive a 15% discount. If the bill is 2000 dollars or less, the person does not receive a discount of any kind. Sample Data: 500 2500 4000 333.33 95874.2154 Sample Output= Enter the original bill amount :: 500 Bill after discount :: 500.00 Enter the original bill amount :: 2500 Bill after discount :: 2125.00 Enter the original bill amount :: 4000 Bill after discount :: 3400.00 Enter the original bill amount :: 333.333 Bill after discount :: 333.33 Enter the original bill amount :: 95874.2154 Bill after discount :: 81493.08

Answers

Answer 1

Answer:

The program in Java is as follows:

import java.util.Scanner;

public class MyClass {

   public static void main(String args[]) {

     double bill;

     Scanner input = new Scanner(System.in);

     System.out.print("Enter the original bill amount : ");

     bill = input.nextDouble();      

     if(bill>2000){

         bill-=0.15*bill;

     }

     System.out.println("Bill after discount: " + bill);

   }

}

Explanation:

This declares bill as double

     double bill;

This lets the program accept input

     Scanner input = new Scanner(System.in);

This prompts user for the original bill amount

     System.out.print("Enter the original bill amount : ");

This gets the bill from the user

     bill = input.nextDouble();      

This checks if the input bill is greater than 2000

     if(bill>2000){

If yes, the bill after discount is calculated as follows:

         bill-=0.15*bill;

     }

This prints the bill after discount

     System.out.println("Bill after discount: " + bill);


Related Questions

An eReader has a 956-pixel x 1290-pixel grayscale display with each pixel able to display 32 shades of gray. What is the KiB size of the display memory for the device

Answers

Answer:

752.71 kilobytes

Explanation:

Given ;

956-pixel x 1290-pixel

Shades of gray, = 32

Bit depth (n) = 2^n

32 = 2^5

Bit depth, n = 5 bits / pixel

The size of display memory :

Pixel dimension * n

(956 Pixel * 1290 pixel) * 5 bits /pixel

= 6166200 pixel * bits / pixel

= 6166200 bits

Converting bits to kilobytes :

1 bit = 1/8 bytes

1 byte = 1/1024 kilobytes

Hence,

1 bit = 1/(8 * 1024) kilobytes

1 bit = 1/8192 kilobytes

6166200 bits = (1/8192 * 6166200) kilobytes

= 752.7099609375 kilobytes

= 752.71 kilobytes

Help brainliest True or False

In Python, the first character in a string has an index position of one.
TRUE/False

Answers

Answer:

False

Explanation:

Hope this Helps! :)

Answer:

False

Explanation:

The first character in the string has an index of 0

A small business has been experiencing power outages in their area. When checking the IP-based security camera, they were not able to access the camera. They verified the camera was on and had power. What is MOST likely the problem?

Answers

Group of answer choices.

A. The camera has an invalid gateway address.

B. The camera has been damaged by the power outage.

C. The camera's memory card is full

D. The camera is not connected to the wireless network.

Answer:

D. The camera is not connected to the wireless network.

Explanation:

An IP address is an acronym for internet protocol address and it can be defined as a unique number assigned to a computer or other network devices, so as to differentiate each device from one another in an active network system. Thus, an IP address is typically used to uniquely identify each computer or network devices connected to the internet or network.

In Computer networking, IP address are classified into two (2) main categories and these are;

1. Local (internal) IP address.

2. Global (external) IP address.

In this scenario, a small business has been experiencing power outages in their area. When checking the IP-based security camera, they were not able to access the camera. They verified the camera was on and had power. Thus, what is most likely the problem is that, the camera is not connected to the wireless network.

This ultimately implies that, the IP-based security camera is only powered on but is not interconnected with the other devices on the wireless local area network (WLAN).

A histogram titled Greeting card sales has date on the x-axis and cards (millions) on the y-axis. January is 1 card, February: 11, March: 1, April: 1, May: 9, June: 7, July: 1, August: 1, September: 1, October: 9, November: 7, December: 12. The histogram shows the monthly sales for a greeting card company in one year. Which best describes the data for May–June and October–December? clusters no frequency gaps symmetry

Answers

Answer:

Clusters

Explanation:

Given

The histogram

Required

What does May-June and October-December represents

The data for May-June is:

[tex]May: 9[/tex]

[tex]June: 7[/tex]

For October-December, it is:

[tex]October: 9[/tex]

[tex]November: 7[/tex]

[tex]December: 12[/tex]

Notice that these data are close to each other.

This implies that they are clusters

Answer:

the answer is a

Explanation:

Match the example with the type of collection.

{'casa': 'house'}


[3, 5]


(3, 5, 'dog')

Answers

Answer: First is a dictionary, second is a list, and third is a tuple

Explanation:

In the Business world people are often measured by their???

A- soft skills
B- hobbies
C- iq
D- technical skills

Answers

Answer: D technical skills

Which of the following programming languages were initially developed to teach programming techniques to students? Choose all that apply.

Answers

Answer:

BASIC programming language

Pascal programming language

Explanation:

C++ programming language

Java programming language

BASIC programming language

Pascal programming language

Answer:

it's C and D

Explanation:

The text between and defines the _____.


active code on a page

active text on a page

active Web-page area

active image on a page

Answers

Active text on a page

For which of the following situations would it be best to use a heuristic in order to find a solution that runs in a reasonable amount of time?
A Appending a value to a list of n elements, which requires no list elements be examined.
B Finding the fastest route that visits every location among n locations, which requires n! possible routes be examined.
c Performing a binary search for a score in a sorted list of n scores, which requires that fewer than n scores be examined.
D
Performing a linear search for a name in an unsorted database of n people, which requires that up to n entries be examined.

Answers

Answer:

The answer is "Option B".

Explanation:

In this question, determining the optimal path between several locations, which requires n!. It's also examining possible routes. It could just suggest here, designers need to do those equations as we have several forms. They have several methods to find the best and efficient path. Its basic idea is to use heuristic approaches for complex or uncertain issues so we do not provide proven solutions for linear programs.

The situation that should be best to use a heuristic in order to find a solution that runs in a reasonable amount of time is option B.

The following information should be considered:

For measuring the optimal path that lies between several locations that needs n!.It also examine the possible routes. It consist of various methods for determining the efficient path.

Learn more: brainly.com/question/17429689

What types of data can you filter using the
AutoFilter tool? Check all that apply.
text
numeric data
images
sound
DONE

Answers

Answer: A and B

Explanation: just did it on edge

a man takes 30 step to cover 18 metre l,how many step he will needed to cover 3003m distance​

Answers

he will need to take 5,004 steps to cover 3003m distance
3003/18=166.8
166.8 x 30=5004
Answer is 5004

Allows input/output of audio info to and from the computer.

A. Central Processing Unit

B. Sound Card

C. Video Card

D. Audio Player

Answers

Answer:

sound card

.............

In Outlook 2016, the Tell Me function can be accessed by
O pressing F1 on the keyboard.
clicking on the File tab, then the question mark button.
typing a query in the textbox on the ribbon.
typing "help" in the search box in the message pane.

Answers

In Outlook 2016, the Tell Me function can be accessed by

O pressing F1 on the keyboard.

clicking on the File tab, then the question mark button.

typing a query in the textbox on the ribbon.

typing "help" in the search box in the message pane.

Explanation:

I think it should be typing a query in the textbox on the ribbon.

In Outlook 2016, the Tell Me function can be accessed by clicking on the File tab, then the question mark button. The correct option is B.

What is Outlook?

The preferred email client for sending and receiving emails from Microsoft Exchange Server is Microsoft Outlook. Accessibility to contact, email, calendar, and task management tools is also provided by Outlook.

You can send and receive emails, manage your calendar, save the names and phone numbers of your contacts, and keep track of your projects using Outlook.

Even if you utilize Outlook on a daily basis, you might not be aware of all the wonderful things it can do to boost your productivity.

By selecting the File tab, then the question mark button in Outlook 2016, you may open the Tell Me feature.

Thus, the correct option is B.

For more details regarding Microsoft outlook, visit:

https://brainly.com/question/26695071

#SPJ2

Anyone recommend any underrated kpop songs? I'm mostly into girl group songs, but I'd be nice to listen to a boy group song for once lol.

When I say underrated please don't put songs with more than 30 million streams lol.

Songs I recommend:

Loona/Cherry-Love Cherry Motion
Loona/ViVi-Everyday I Love You
Binu-Bibi
BIYA- COTAI
Luri- Blah Blah
Nature- OOPSIE
Nature- Girls
fromis_9- Heart to Heart
fromis_9- DKDK

There's so much more, buy my brain just stopped working

Answers

Answer:

Omona - Mixnine.

Highlight - Iz*one.

Downpour - IOI.

Goodbye - 2NE1.

Lonely - Sistar.

Stylish - Loona.

Satellite - Loona.

Twilight - Kim Lip.

Explanation:

Answer:

NCT127 /STCKER

Explanation:

Name and define (or list the set that defines) three of the four common data types in programming.

Answers

Answer: this is the  Answer your question

Please explain what Level 5 Automation is and give 2 examples of the technology.

Answers

Level 5 ( Full Driving Automation ) Level 5 cars won't even have steering wheels or acceleration / braking pedals . They will be free from geofencing , able to go anywhere and do anything that an experienced human driver can do .

Pls follow me and Mark as brainlest!!! :-)

5. Robotics deals with the design, construction, operation, and use of robots, as well as computer systems for their control, sensory feedback, and information processing.
These technologies are used to develop machines that can substitute for humans and
replicate human actions.
a) False
b) True

Answers

The answer would be

True

What is the role of the connection medium?

Answers

wth does that mean?!

Do you think people are willing to buy these products? Why?

Answers

What products ma’am/sir

Answer:

ano pong product ok anwer

Explanation:

he/she is willing to buyy a product of the product is good and the entrepreneuris also good and always clean your product and if its good im sure he or she buy that product exept if she/he is nothing money

20 points for ez question lol

Which are characteristics of effective presentations? Check all that apply.

The presentation is well organized.
The presenter speaks clearly.
The presenter reads from notecards.
The presentation is enhanced with visual aids.
The presentation includes some delay to set up audio or video.
The presentation captures the audience’s attention.

Answers

The characteristics of effective presentations are:

The presentation is well organized. The presenter speaks clearly.

What are characteristics of an effective presentation?

Others are:

The presentation is enhanced with visual aids. The presentation captures the audience’s attention.

A good presentation is known to be one that is often concise and also  focused on the topic that is under discussion.

Note that when the above presentation follows the option written above, it is said to be an effective or good presentation.

Learn more about presentations from

https://brainly.com/question/24653274

#SPJ2

Answer:

A,B,D,F

Explanation:

The presentation is well organized.

The presenter speaks clearly.

The presentation is enhanced with visual aids.

The presentation captures the audience’s attention.

Application software consists of programs that perform a specific task for users. Examples include microsoft word internet explorer and micro type 5.

A.true
B.false​

Answers

Answer: verdadero

Explanation:

Complete the static method stringSearch, which returns a String that tells where the first occurrence of the characters (chr) were found ("The characters were found at ____ index.") or it says, "Those characters could not be found." The String to be searched (phrase) and the characters that are being looked for (chr) are passed in as arguments. (9 points) public static String stringSearch (String phrase, String chr) { ** Complete the code ** }

Answers

Well can't do it for you but try using that phrase argument with string compare functionality

Merle wants to change the formatting of all bold cells to be non-bolded. Shania wants to copy the cell color,
border, and font from cell E12 to all of column D. Which best describes what each person should do?

A. Merle should use Find and Replace, and Shania should use the Format Painter.

B.Merle should use the Rules Manager, and Shania should use Find and Replace.

C.Merle should use the Format Painter, and Shania should use the Rules Manager.

D. Merle should use the Format Painter, and Shania should use Find and Replace.

Answers

Answer:

Merle should use Find and Replace, and Shania should use the Format Painter.

Explanation:

It's the most logical to me.. And that's what I'm gonna do on my test. =) hope it helps.

.xls is the file extension for this file type

A. Image File

B. Internet File

C. Spreadsheet File

D. Word Processing File

Answers

Answer:

Spreadsheet File

Explanation:

Most word processing files are doc or docx

Most internet files are htm or html

Most Image files are jpg or png

In which TWO cases would you need to format a cell in a spreadsheet that contains a number? to make sure a formula includes it in calculations to change its appearance to make it easy to visually locate it to ensure no-one can use the number in calculations to ensure no-one can hide the column that contains it

Answers

Answer:

to make sure a formula includes it in calculations to change its appearance to make it easy to visually locate it

Explanation:

Microsoft Excel is a spreadsheet application used for data analysis and visualization. The worksheet of the excel file is tabular with rows and columns. A single block of the worksheet is called a cell and holds a single item located by the row and column label.

The particular cell can be referenced in a formula using the absolute reference operator '$' with the syntax "$column-label $ row-number". The background of the cells can also be formatted to have a different color.

HEEEEELPPP!!!BRAINLIEST!!! THIS IS URGENT!!!

Read the following code:

count in range(80):
leo.forward(count * 2)
leo.left(count + 2)

There is an error in the for loop. What should be fixed?

Add a colon to the end of the statement
Begin the statement with the proper keyword to start the loop
Place the loop condition outside the parentheses
Replace the parentheses around the range with quotation marks

Answers

Answer:

Begin the statement with the proper keyword to start the loop

Explanation:

Given

The code segment

Required

Fix the code

The first line of the code segment is meant to be a for loop, but it does follow the right syntax.

This is so because the for keyword is missing.

The first line should be corrected and replaced with:

for count in range(80):

Hence, option (b) is correct

Software that displays advertising material when online.

A. Adware

B. Advertisware

C. Consumerware

D. Sellware

Answers

Answer:

adware

Explanation:

Adware is a software that shows ads etc online, but also sometimes on the desktop.

Advertisware is not a real term, this is to throw you off.

Sellware is a website not a type of software

Adware is software that displays advertisements automatically once installed.

Consider the following code: x = 5 x = x * 3 print (x) What is output

Answers

Answer:

Output: 5

Explanation:

It will print 5 on the screen

Which is an email protocol that retrieves email without deleting the email and its attachments from the server?
Simple Mail Transfer Protocol (SMTP)

Internet Message Access Protocol (IMAP)

Post Office Protocol version 3 (POP 3)

Simple Network Management Protocol (SNMP)

Answers

Answer:

Internet Message Access Protocol (IMAP)

Explanation:

The "Internet Message Access Protocol" or IMAP was created by Mark Crispin at the Stanford Knowledge Systems Laboratory. It allows a person to access his email from his local server. In comparison to the Post Office Protocol Version 3 (POP 3), which deletes the emails once they are downloaded, the IMAP allows the contents to be saved on the server. The email will only be deleted if the user intends to do so.

Answer:

It is Pop 3 not IMAP

Explanation:

Correct on edg 2022

List and describe 3 parts (often referred to as 'elements') of a web page?

Answers

Answer:

Content

Design

Development

Explanation:

The design and management of sites is internet explorer; it is the research that takes place over time to make a site look fantastic, work quickly and function well with a smooth user interface.

Other Questions
Anne is playing golf. On the first tee, she hits a slow shot down the Y = x -0.0 4X squared, we are why is the balls hide in the air and eggs is a horizontal distance in his drawer from the tea. The distance or measured in feet how far from the tea does the ball hit the ground Specify the set of B by giving a written description of Its element where B={ 0,1,4,9,16,25} What is one thing the Persian's contributed to society or one idea they shared with other societies? PLEASE HELP ME ILL GIVE BRAINLIEST ITS DUE SOON OMG Solve for x.3(3x+3)-5x-4= 25 Which section of the ocean floor is near the coastline of all continents The store offers a 35% discount. If the regular price of an item is x dollars, what is the discount price in dollars? The price of a stock decreased $2 each day for seven consecutive days what was the total change in value of the stock over the seven days Why is it important to study corrections? write an equation of the line and interpret the slope Why is it bad if blood pressure is too high? Too low? Circulatory System differentiate between the following types of movement observed on a wet mount or hanging drop slide: directional movement Brownian movement water current movement Can someone help me? Which of the below elements are part of a group? Feel free to use the periodic table. A. H, He, O, C B. Be, Mg, Ca, Sr C. Li, Be, C, O D. H, Li, Na, Mg Every school policy is for the better of the students learning in that school. It can either be through educating them with more educational courses or by helping them be productive and comply with the set standards our society is setting on the children of our generation. These policies are mostly addressing to shape the students to their best selves. Convert the following repeating decimal to a fraction in simplest form..6 What are redox half-reactions? What does a number in front of a molecular formula stand for? The blues was shaped byculture, the experience ofand many otherbut it emerged as a distinct formonly around the turn of the twentieth century - some four decades after the abolition of slavery and several generations removed for themother continent. Please help: Spanish 1Give the correct conjugation: 1: T comenzara) comienzesb) comenzoc) comenzasted) comienzas2: Yo cerrara) cerrarb) cierroc) cerrod) ceierro3: it snow nevara) nevab) nievac) nievod) nevamos4: nosotras pensara) pensasb) pensarc) pensamosd) piensamos5: vosotros venira) vienenb) vensc) viensd) venir6: Ustedes preferira) preferirb) prieferenc) priefierend) preferen7: Yo empezara) iempiezob) empiezoc) empezod) yo empezar8: T venira) vengob) vienesc) viened) venes