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
Select two netiquette guidelines. In three to five sentences, explain why these guidelines make professional online communicatio
meriva
Netiquette is etiquette when using the internet. The first guideline refers to posts on social media. Individuals should be mindful that posts can be read by anyone including employers and family members. Individuals need to ensure that material shared is not offensive. The next guideline refers to materials or content that is posted. Users must ensure that material posted does not belong to someone else or is copyrighted. Permission must be sought the owner must be cited or recognized. 
7 0
3 years ago
Read 2 more answers
Your computer is configured to obtain an ipv4 address and dns server address automatically. what utility will help you to find t
dolphi86 [110]
Terminal commands - ifconfig or ipconfig on windows
7 0
3 years ago
If you could design your own home, what kinds of labor-saving computer network or data communications devices would you incorpor
Kay [80]

Answer:

Access Points, Home Server, and Virtual Assistant/IOT connected devices

Explanation:

There are three main things that should be implemented/incorporated into your design and these are Access Points, Home Server, and Virtual Assistant/IOT connected devices. Access Points for Ethernet, and HDMI should be located in various important walls near outlets. This would allow you to easily connect your devices without having to run cables around the house. A home server will allow you to easily access your data from multiple devices in your home, and if you connect it to the internet you can access that info from anywhere around the world. Lastly, would be a virtual assistant with IOT connected devices. This would allow you to control various functions of your home with your voice including lights, temperature, and locks.

4 0
3 years ago
Que Inventos Importantes se Crearon durante la edad de agua y viento
ss7ja [257]

Answer:

Sep 24, 2016 · Que inventos importantes se crearon durante la edad del agua y el viento Recibe ahora mismo las respuestas que necesitas!

Explanation:

3 0
3 years ago
How many mb are in a gb?
frosja888 [35]

Answer:

1000 megabytes are in a gigabyte

Explanation:

3 0
3 years ago
Other questions:
  • SOMEONE PLEASE HELP ASAP!!
    14·2 answers
  • Your mobile device files can be synchronized using ________. hdmi a secure digital transmission a display adapter a cloud servic
    11·1 answer
  • Give sally sue specific suggestions on how she can improve her powerpoint skills.
    6·1 answer
  • how write a program to prompt the user for hours and rate per hour using input to computer gross pay Use 35 hours and rate2.75 p
    9·1 answer
  • Difference between automated testing and manual testing
    13·1 answer
  • Question #5
    15·2 answers
  • Please list 15 safety rules that you think should be practiced in the Computer Technology classroom/lab.
    12·1 answer
  • mary needs to rename her report.txt file to final_report.txt. which command will allow her to do this?
    10·2 answers
  • In order to control access to a company's intranet and other internal networks, all communications pass through a _____ server.
    5·1 answer
  • What are three coding languages that are used to build websites?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!