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
garri49 [273]
3 years ago
12

You do not need to use any functions beyond the main function in this problem. Initialize an array of int with the values: 4, 6,

9, and 12. Write a for loop to add the values in the array and find their sum. Write a second loop to print the values from the array and their sum in the following format: 4 6 9 12
Computers and Technology
1 answer:
zheka24 [161]3 years ago
4 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

    int[] arr = {4, 6, 9, 12};

    int sum = 0;

   

    for(int i=0; i<arr.length; i++){

        sum += arr[i];

    }

   

    for(int i=0; i<arr.length; i++){

        System.out.print(arr[i] + " ");

    }

    System.out.println("");

 System.out.println("The sum of the numbers: " + sum);

}

}

Explanation:

* The code is written in Java.

- Initialize the array with the given numbers

- Initialize the <em>sum</em> variable as zero

- Calculate the sum in the first for loop

- Print the numbers in the second for loop

- Print the <em>sum</em>

You might be interested in
If you were setting up a network with 100 nodes and you wanted no more than 25 nodes per segment: what devices and connections w
STatiana [176]

Since at present number user or nodes in an organization counts is 100 and it can be further extended. Moreover concurrent at presented is 25 nodes is active.

<u>Explanation:</u>

So as best practice network administrator has keep in mind and select hardware application.

1. Server with high end rams and further extendable.

2. Minimum life of hardware such as routers, switch or managed or firewall should be considered or two years. But to technology improvement it is possible for 1 year only

3. Upgradable hardware appliances and software updates should be possible with mini cost effect.

4. Network security   and update or upgradable workstation or desktop or laptop to be consideration.

5. Functional operation of an organization should run smoothly.

8 0
3 years ago
Annabella was giving a presentation to a group of 20 real estate agents on
podryga [215]

Anticipate questions.

3 0
3 years ago
Read 2 more answers
State four input device that are used for playing gaming programs​
bekas [8.4K]

Answer:

Mouse, Keyboard, Headphones, Charger.

Explanation:

These can be plugged into the computer for gaming and other uses.

5 0
2 years ago
Read 2 more answers
What does cro stand for?
mr_godi [17]
It stands for Chief Risk Officer 
8 0
3 years ago
Read 2 more answers
How to transfer photos from iphone to computer
SSSSS [86.1K]
If you’re using a Windows computer, the best way to transfer photos from your iPhone to your computer is via USB cable.
First, plug your phone into your computer using the phone’s USB Cable. The Photo app should launch automatically then click the Import button. Check to select the photos you wish to transfer. Once you checked all the photos you wish to transfer, click on Continue. Click Import to start the transfer.
3 0
3 years ago
Other questions:
  • A firewall is either software or dedicated hardware that exists between the __________ being protected.
    13·1 answer
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
    7·2 answers
  • Universal Containers needs to add an additional recipient to a workflow email alert that isfired from the case object. What type
    6·1 answer
  • Senior executives at a global manufacturing company are determining the key performance indicators they'll use to judge how effe
    15·1 answer
  • You would like to know how many cells contain data. Which function should you use?
    11·1 answer
  • Write SQL statements for the following: 1. 2. 3. Change the column Z of a table XYZ to now acceptdefault value 9999 Delete a tab
    8·1 answer
  • What is the model for 2017 Ford Mustang v6
    15·1 answer
  • Help me with this, please. Are vacuum cleaners, Cd players, and telephones considered computers? Do they store any data or proce
    8·2 answers
  • What feature allows you to access previous copies of a document on OneDrive?
    15·2 answers
  • What dd command would you use to copy the contents of a partition named /dev/drive1 to another partition, called /dev/backup?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!