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
Mama L [17]
3 years ago
13

(Java) Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for ind

ividual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85.
import java.util.Scanner;
class Eggs {
public static void main(String[] args) {
// Write your code here

}
}​
Computers and Technology
1 answer:
zepelin [54]3 years ago
8 0

import java.util.Scanner;

public class Eggs {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("How many eggs?");

       int eggs = scan.nextInt();

       int dozens = eggs / 12, ind = eggs - (dozens*12);

       

       System.out.println("You ordered "+eggs+" eggs. That's "+dozens+" at $3.25 per dozen and "+ind+" loose eggs at 45 cents each for a total of $"+((dozens*3.25)+(ind*0.45))+".");

   }

   

}

I hope this helps!

You might be interested in
In your own words, what is pair-programming? What is the role of the driver? What is the role of the navigator? What are some be
KATRIN_1 [288]

<u>Paired programming:</u>

Paired programming is a new technique where one person gets one another to<em> write the code</em>. Here one will write the code and other will start verifying as the type.

So we might think it is waste to employ two person for same task but it is not so. There are many <em>benefits in incorporating this technique</em>. Let us see those benefits one by one.

  • <em>Inter-personal skill gets improved </em>
  • <em>Lower amount of coding mistake </em>
  • <em>Learn from each other </em>
  • <em>Peer review enhance collaboration </em>

Challenges expect to arise during pair-programming

  • Two heads are superior to one. On the off chance that the driver experiences a <em>hitch with the code</em>, there will be two of them who'll take care of the issue.  
  • Builds up your <em>staff's relational aptitudes</em>. Working together on a solitary venture encourages your group to welcome the estimation of <em>correspondence and collaboration.  </em>

Overcome Method

The most ideal approach to move <em>toward blending</em> is to accomplice two software engineers and have them share a PC. The pair ought to have the option to choose how to part the work, and it is prudent that they should <em>switch jobs frequently.</em>

7 0
3 years ago
What is the output <br>this is a computer science question ​
olga2289 [7]

Answer:

output is a last step of IPO cycle in which we can get meaningful information through output devices

6 0
3 years ago
Corey wrote a code that will display his name every time he presses the down arrow key but there is a bug in it. Display letter
brilliants [131]

Answer:

Explanation:

display letter c, type letter r, type letter o, type letter 3, type letter y- i think thats it but i dee cay this is confusing

7 0
3 years ago
2) List three (3) negative impact of Technology on society
Nataly [62]

Answer:

1. social media and mobile devices may lead to psychological.

2. They may contribute to more serious health conditions such as depression.

3. The overuse of technology may have a more significant impact on developing children and teenagers.

Explanation:

may this help you have a good day

5 0
3 years ago
What is the full form of flops​
kobusy [5.1K]

Answer:

<em>Floating Point Operations Per Second</em> (FLOPS)

Explanation:

<em>Floating Point Operations Per Second</em> (FLOPS) is a measure of a computer’s performance, especially in fields of scientific calculations that make heavy use of floating-point calculations. Floating-point operations include any operations that involve fractional numbers.

8 0
3 years ago
Read 2 more answers
Other questions:
  • There are n tasks to complete. Each task first needs to be preprocessed on a supercomputer and then finished on one of n process
    12·1 answer
  • For wired network cards that get their IP addresses through DHCP, what can be set manually?
    5·1 answer
  • What does sampling accomplish? Choose all that
    11·1 answer
  • Prewritten, commercially available sets of software programs that eliminate the need for a firm to write its own software progra
    5·1 answer
  • A variation of pronounce is a. Proclaim c. Produce b. Profound d. Pronunciation Please select the best answer from the choices p
    11·1 answer
  • Who all likes fortnite
    15·2 answers
  • Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
    15·1 answer
  • State all the generations of computers.
    10·2 answers
  • Which functions are examples of logical test arguments used in formulas? Check all that apply. OR IF SUM COUNT NOT AND
    12·2 answers
  • Karl comes across confidential information. What should he do with it? A. Manipulate the information in his favor B. Sell the in
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!