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
How can I become front end developer
yawa3891 [41]
The answer is by earn a recognized diploma get a guaranteed job.
8 0
3 years ago
Read 2 more answers
State three reasons why users attach speakers to their computer​
____ [38]

Answer:

For listening sake

To listen to information from the computer

They receive audio input from the computer's sound card and produce audio output in the form of sound waves.

8 0
2 years ago
CHKDSK is a system utility that is commonly found in Windows. What is CHKDSK? Use the Internet to research and write about CHKDS
Alex_Xolod [135]

chkdsk is a utility that you use to check for bad sectors on a hard drive , as far as how to run it you open the start menu go to your run bar and type chkdsk then follow the instruction on the screen .

6 0
3 years ago
Read 2 more answers
What is a hacker who breaks into other people's computer systems and may just look around or steal and destroy?
inessss [21]
A cyber gang or cyber theif
5 0
3 years ago
Read 2 more answers
What is computer???<br>A. Electornic device<br>B. Storage<br>C. Accuarcy.<br>D. Communciation​
Gemiola [76]

Answer:

A

Explanation:

It's explanable the other ones dont make sense

8 0
2 years ago
Other questions:
  • NEED HELP FAST
    13·2 answers
  • In order to prevent unauthorized access, how can the shadow file be configured to enforce a password policy?​ What happens to ac
    6·1 answer
  • Different units of CPU ?
    12·1 answer
  • Using Matlab programming I need to rotate the line defined by x,y by 45 degrees around 2,2
    13·1 answer
  • ______ includes websites that encourage interaction and connection among people, businesses, and organizations.
    9·2 answers
  • Internet control message protocol (icmp) is a method of ip address assignment that uses an alternate, public ip address to hide
    7·1 answer
  • The central processing unit​ (cpu) works in conjunction with​ ________ to perform processing.
    5·1 answer
  • 4. Write an interface ObjectWithTwoParameters which has a method specification: double area (double d1, double d2) which returns
    9·1 answer
  • Which devices are used in networking
    15·1 answer
  • Assume we are using the simple model for floating-point representation as given in this book (the representation uses a 14-bit f
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!