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]
2 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]2 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
Heelo how do u do python syntax lesson 11 on code academy
pochemuha

have you tried www.khanacademy.org 


3 0
3 years ago
Whose task it is to ensure that the product flows logically from one step to another?
vlabodo [156]

Answer:

The broad responsibility of a UX designer is to ensure that the product logically flows from one step to the next. One way that a UX designer might do this is by conducting in-person user tests to observe one’s behavior.

Explanation: I don't know if this is what your looking for though.

3 0
3 years ago
How do I answer a question that was answered incorrectly on Brainly
Mashcka [7]

Answer:

Explanation:

Go and ask a teacher or search

6 0
3 years ago
Read 2 more answers
A low concentration of market power has positive affects. A low concentration of market share has which of the following effects
lisov135 [29]
A or b i think hope it helps good luck and i hope it helps
6 0
3 years ago
How many total numbers can be represented with an 8-bit binary (base-2) system?
ddd [48]

Answer:

256

Explanation:

4 0
3 years ago
Other questions:
  • Christine wants to send a quick communication to all department managers. She should send a _____. report
    13·2 answers
  • What is runtime error in Python? Provide an example
    14·1 answer
  • A _____ is a harmful program that resides in the active memory of a computer and duplicates itself. Select one: a. scareware b.
    7·1 answer
  • When the continue statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignore
    5·1 answer
  • A company that provides finance services wants to shift to a mobile platform. What is the major advantage that the users of the
    10·2 answers
  • What is a URI (include example)
    7·1 answer
  • Write Java code that creates an array of n integers myArray, by taking n integers from the user with duplications, and do the fo
    8·1 answer
  • Write an algorithm to find the average of three numbers: 10, 20, 30
    7·1 answer
  • Can you explain the difference between software and hardware? Tell me 3 examples of each one.
    10·1 answer
  • What is a phone made out of dna
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!