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
vampirchik [111]
3 years ago
9

Design a for loop that gets 6 integer numbers from a user, accumulates the total of them, then displays the accumulated total to

the user. Just write the code segment to show what is asked, not a complete program. However, declare any variables that you need to use. Use a semicolon (;) at the end of each line of code so I can tell when you use a new line in your code.
Computers and Technology
1 answer:
PSYCHO15rus [73]3 years ago
6 0

Answer:

Explanation:

The following loop code is written in Java and asks the user for the 6 integer numbers as mentioned in the question and sums them up. Finally putting them into a variable named total and printing it out.

       int total = 0;

       for (int x = 0; x < 6; x++) {

           Scanner in = new Scanner(System.in);

           System.out.println("Enter an integer: ");

           total += in.nextInt();

       }

       System.out.println("Your total is: " + total);

You might be interested in
What is likely to happen to the economy when there’s too much money or credit circulating?
Svetlanka [38]
It depends on HOW much money is circulating. If governments just print money with nothing to back it, hyperinflation occurs. If there's a bit too much money and credit, inflation happens. Generally, 3% inflation is considered normal and a healthy amount by economists.
5 0
3 years ago
Permission must be sought in order to use a play that is in the public domain. True or False?
sertanlavr [38]

Answer:

False

Explanation:

Permission can't be sought in order to use a play that is in the public domain.

5 0
3 years ago
Read 2 more answers
A 4-way set associative cache has 64 blocks of 16 words. How many bits are there in the ""tag"" field of the 15-bit address for
Tanya [424]

Answer:

3 bits

Explanation:

Given a 4- way set associative cache that has 64 blocks of 16 words.

Therefore, the number of sets cache has:

\frac{64}{4} = 16

Now,

Cache data size is 16kB

The number of cache blocks can be calculated as:

16kB/16 = 1024 bytes/16 byte\times 16 = 256 cache blocks

Now,

Total sets = \frac{cache blocks}{associative sets}

Total sets = \frac{256}{4} = 64

Now,

2^{n} = 64

n = 6

For 15 bit address for the architecture, the bits in tag field is given by:

15 - (6 + 6) = 3 bits

Thus the tag field will have 3 bits

6 0
3 years ago
A server needs to connect directly to the Internet. The ipconfig/all command shows that the server has been auto-assigned the IP
Deffense [45]

Answer:

Link-local address

Explanation:

IP addresses that have "FE80" as the hexadecimal representation of their first 10 bits are IPV6 reserved addresses for link-local unicast addressing. These addresses are automatically configured (though may be manually configured too) on any interface and should not be routed. They are used for addressing on a single link with the main aim, among others, of automatic configuration and routing protocol advertisement. Devices attached to this link can be accessed or reached using the link-local addresses as they don't need a global address to communicate.

However, routers will not forward datagram or packets using link-local addresses. In other words, routers are not allowed to connect to the internet using the unicast link-local addresses.

8 0
2 years ago
You receive a phone call from a co-worker telling you that "the network is down." Just as you are about to look into the issue,
Dvinal [7]

This issue will happen mostly if cellular network will not be down, or suppose if cellular network is down mostly, or it will be rainy or a current cutoff issue might be occurred.

<u>Explanation:</u>

The following step to be made for trouble shoot his phone when cellular network is down.

1. Restart the mobile:- After restarting kindly check mobile connectivity.

2. Check for mobile air plane mobile and make sure the mobile phone is not in air plane mode.

3. Check the income and outgoing vapidity.

4. Switch off the mobile, Remove service provider sim card from mobile and reinsert the sim card and start the mobile.

5. Still connectivity problem, either contact the service provider or replace with new sim card.

5 0
3 years ago
Other questions:
  • What task can a user accomplish by customizing theme colors?
    14·2 answers
  • 3.What is deep focus, and when is it a good choice for a scene?
    8·1 answer
  • A retail company assigns a $5000 store bonus if monthly sales are $100,000 or more. Additionally, if their sales exceed 125% or
    5·1 answer
  • How can you enter Task Manager in Windows? Select 3 options. press Ctrl + Shift + Tab press Ctrl+Alt+Delete and then click Task
    8·1 answer
  • The game begins with the player having 20 POINTS
    11·1 answer
  • Which of the following is NOT a useful strategy when making an informed purchase ?
    7·1 answer
  • A program that allows employees to choose their starting and ending times, as long as they are at work during a specified core p
    8·1 answer
  • Give 5 comparisons of the three employees with the highest net pay
    5·2 answers
  • List and describe each of the activities of technology
    11·1 answer
  • What is the difference between autofocus and autocomplete
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!