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
cupoosta [38]
3 years ago
11

If apples are currently $4.99 a dozen, create a program that will determine the cost of any number of apples. Make the cost of a

dozen apples a variable as well, so that it can easily be changed if the price of apples changes.
Computers and Technology
1 answer:
CaHeK987 [17]3 years ago
7 0

Answer:

Explanation:

The following code is written in Java, it takes the cost of a dozen apples as a variable (costPerDozen), it then asks the user for the total number of apples that is places in a variable called (numberOfApples). It then calculates the total cost of the apples by dividing the costPerDozen by 12 and then multiplying by the total nuumber of apples requested. Finally it prints out the total.

 public static void main(String[] args) {

       double costPerDozen = 4.99;

       Scanner input = new Scanner(System.in);

       System.out.println("How many apples would you want?");

       int numberOfApples = input.nextInt();

       double totalCost = (costPerDozen / 12) * numberOfApples;

       System.out.println("That will cost: " + totalCost);

   }

You might be interested in
Which type of password would be considered secure?
Annette [7]
A strong password obeys some password rules, such as:
- minimum length
- using characters from different classes (uppercase, lowercase, numbers, typographic characters)

Your safest bet these days is to use a password manager and have it generate one for you, so that hackers can not guess it by understanding humans' predictable mind. ;-)
6 0
3 years ago
Name the contributions of Steve Jobs and Bill Gates, with respect to technology.
Sergio [31]

Answer: Steve Jobs made several contributions towards technology by introducing the range of Apple devices and technologies .he started the Apple Incorporation.The technologies introduced by his company are as follows:-

  • iPod
  • iPhone
  • Apple Lisa
  • iMac
  • iPad etc.

 Bill Gates is the founder of Microsoft incorporation and made a lot of development in that field to create various software for the operating system.the creation of "Microsoft Window" was started by him and some other contributions are as follows:

  • Windows 7
  • Windows 8
  • Vista
  • XP
  • windows 95 etc.
3 0
3 years ago
Google, Yahoo, and Microsoft search all use the same Web crawler.
statuscvo [17]
The answer is going to be False they do not use the same Web crawler. 
HOPES THIS HELP:)
4 0
3 years ago
Read 2 more answers
One way to prepare for filing the PROFILE is to:
kozerog [31]
I think I am not sure that it is probably b
8 0
3 years ago
Read 2 more answers
Demote the "Arrive and leave at the same time each day." List item, and then promote the "Respect" list item.
garri49 [273]

Answer:

Dear

<h3>You should wear something professional. A tie, suit, classy dress, heels. You are more likely to be hired if you make it look like you take pride in your appearance. Also, depending on what kind of job you are applying for, the outfits can vary as well.</h3>

Explanation:

Black is too formal for interviews, and earth tones are too casual. Two-button suits are the professional standard.

7 0
3 years ago
Other questions:
  • Ead the following scenario and then answer the question.
    10·1 answer
  • The first computer (the eniac was how big
    8·1 answer
  • Traffic that is encrypted will typically pass by an intrusion prevention system untouched.a. Trueb. False
    10·1 answer
  • I Just Realized................
    7·2 answers
  • A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
    13·1 answer
  • If you're unsure of what chart to use for a set of data, what feature does Excel include that will help you to decide?
    7·1 answer
  • I used the app and my answers were still wrong??????how
    8·2 answers
  • Taking a group of recipes and identifying the similarities is an example of _____.
    13·1 answer
  • What is the error in this?<br><br> userGuess = int(input(“Guess a number between 1 and 20: “))
    12·1 answer
  • Select the correct answer from each drop-down menu.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!