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
KengaRu [80]
3 years ago
9

Create a new Java project/class called Examine1. Prompt user as to how many numbers they would like to enter. Use a cumulative s

um loop to read in and sum that many numbers. Once all numbers entered, program should print out the sum total and average of those numbers entered by the user. Use the printf command to format. Paste code.
Computers and Technology
1 answer:
Zinaida [17]3 years ago
8 0

Answer:

Explanation:

The following code is written in Java and like requested prompts the user for a number to continue or a letter to exit. Then loops and keeps adding all of the numbers to the sum variable and adding 1 to the count for each number entered. Finally, it prints the sum and the average using printf and the variables.

import java.util.Scanner;

class Examine1 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int sum = 0;

       int count = 0;

       System.out.println("Enter a number to continue or a letter to exit.");

       while(in.hasNextInt()) {

           System.out.println("Enter a number:");

           sum += in.nextInt();

           count += 1;

       }

       System.out.printf("The sum is %s.%n", sum);

       System.out.printf("The average is %s.", (sum / count));

   }

}

You might be interested in
Kendall receives an email stating that a leading computer company is giving away free computers, asking her to forward the email
gavmur [86]

Explanation:

Kendall should report the email as scam and delete email instead of forwarding it. She should also run her virus protection software as these kind of emails on the Internet are mostly Fraud and can contain virus so the user should avoid them.

8 0
3 years ago
Use the drop-down menus to complete the statements about using section breaks in a document
krok68 [10]

Answer:

layout, next page, continuous

Explanation:

just took it

7 0
3 years ago
a network administrator for a large oil company has discovered that a host on the company network has been compromised by an att
Slav-nsk [51]

My recommendation as an immediate response to prevent further spoofing of the host is to Revoke the host's certificate.

<h3>What does revoke certificate mean?</h3>

Certificate revocation is the process by which one can  invalidate a TLS/SSL and this is one that is often done before its scheduled expiration date.

Note that A certificate need to be revoked immediately  and as such, based on the case above, My recommendation as an immediate response to prevent further spoofing of the host is to Revoke the host's certificate.

Learn more about network administrator from

brainly.com/question/4264949

#SPJ1

8 0
2 years ago
What part of speech is contend
Amiraneli [1.4K]
Assuming the context, it would be considered a verb.

ie: "She contended to me that I was not acting maturely." 
7 0
3 years ago
(Game Design) Game Freak, the creators of Pokemon, are an example of a(n):
bixtya [17]
D. Indie developer. Independent video game development, or indie game development, is the video game development process of creating indie games; these are video games, commonly created by individual or small teams of video game developers and usually without significant financial support of a video game publisher or other outside source.
7 0
3 years ago
Other questions:
  • Create and apply a css class named bigblue, which selects a large, blue-colored font.
    11·1 answer
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    7·2 answers
  • Which options correctly describe Andrew's job role?
    6·1 answer
  • How would you describe enterprise computing
    12·1 answer
  • Which data type stores images and audio visual clips?
    9·2 answers
  • An anthropologist may try to learn why and how a culture develops.<br><br> A.true<br> B.false
    13·1 answer
  • Integration Management, one of the 10 PMBOK Guide Knowledge Areas, represents the processes and activities to identify, define,
    12·1 answer
  • What is the web of trust
    7·2 answers
  • Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
    10·1 answer
  • If you came across an article that discussed the benefits of studying the night before a test rather than the morning of, what c
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!