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
An attacker obtains a connection to your LAN and then uses SETH to perform a MiTM attack between your system and the company RDP
maxonik [38]

The type of attack which has occurred in this scenario is known as credential harvesting.

<h3>What is credential harvesting?</h3>

Credential harvesting is also known as account harvesting and it can be defined as a type of attack that involves the use of the following techniques to illegally obtain large numbers of user credentials (username or password):

  • MITM attacks
  • DNS poisoning
  • Phishing

In conclusion, the type of attack which was used in this scenario is known as credential harvesting.

Read more on phishing here: brainly.com/question/23850673

#SPJ1

3 0
2 years ago
Administrators who are wary of using the same tools that attackers use should remember that a tool that can help close an open o
In-s [12.5K]

Answer:

False.

Explanation:

Administrators showing caution in using the same tools that are used by the attackers remember that tool that can help to close a poorly configured or open firewall will help network defender and it will minimize the risk from the attack.

Hence the answer to this question is false.

6 0
3 years ago
Simple mail transfer protocol (smtp) uses the well-known port number ______________ by default.
Elden [556K]
I believe it's default is port 587. 
8 0
4 years ago
Read 2 more answers
You are attempting to run a Nmap portscan on a web server. Which of the following commands would result in a scan of common port
Bess [88]

Answer:

Nmap CST CO CT0

Explanation:

Network map (Nmap) is a network scanning and host detection tool used in penetration testing to sorting out vulnerability in a network. Nmap APIs are used in packet sniffer tools as well to scan for available networks. There are different nmap command , but the command needed to scan a port with less noise to evade an IDS is the nmap's "Nmap CST CO CT0" command.

5 0
4 years ago
Why does people that gets abused not report?
AleksandrR [38]
It might be because they are afraid that tge person they report will likley get into trouble or the report might not work and they will be abused more
7 0
3 years ago
Other questions:
  • Discuss the important basic building blocks required to create a web page in HTML/XHTML. Discuss how to place CSS rules within y
    15·1 answer
  • A restaurant has a case type that allows customer to book the dining room for events. Customers provide basic information includ
    7·1 answer
  • If the user enters 26 what is output? _____________
    15·1 answer
  • A student builds a model of an ATP molecule out of some scraps she finds at home. She uses a block of wood for the bulk of the m
    5·1 answer
  • You started writing a paper yesterday. You worked on it again today. After a few hours, you realized that you have introduced so
    15·2 answers
  • How do I get the bot token for discord? (scripting etc)
    5·1 answer
  • What percentage of teens say they have witnessed cyberbullying?
    6·2 answers
  • Examine the weather map.
    12·2 answers
  • Mary and Billy are moving away to college and both know in their hearts that they need to end their relationship. They move away
    5·1 answer
  • A _____ consists of horizontal bars, connected with arrows that indicate task dependencies.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!