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]
2 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]2 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
Collaboration, listening, and negotiating are considered __________ skills.
Marina86 [1]

Answer:

interpersonal

Explanation:

Interpersonal skills are the types of skills that enhance the individuals' social interaction and communication means with others whereby there is the establishment of social rules and references.

It involves social communication activities such as collaboration, listening, and negotiation.

Hence, in this case, the correct answer is "INTERPERSONAL SKILLS.

5 0
2 years ago
George wants to pursue a career in web technology as a web developer. Which certifications can help him as a web developer?
skelet666 [1.2K]

Answer:Google Analytics IQ.

he can use this

Explanation:

3 0
3 years ago
; This program replaces the value in R0 with its absolute value. ; ; It does NOT modify any other registers! ; .ORIG x0200 START
olasank [31]

Using the knowledge in computational language in LC-3 Assembly it is possible to write a code that replaces the value in R0 with its absolute value

<h3>Writting the code </h3>

       .ORIG x0200

START

       AND R0, R0, #0  ; copy R0 to itself to set the condition codes based on R0;

                       ; i.e performing addition operation with Zero option to set the flags

       BRzp DONE       ; if R0 is NON-NEGATIVE, skip the negation (already correct);

                       ; Branch to DONE if number is poistive

       NOT R0, R0      ; R0 is negative, so negate it i.e taking 2's complement

       ADD R0, R0, #1  ; R0 = -R0 is performed successfully

DONE    BR START

       

       .END

See more about  LC-3 Assembly at brainly.com/question/12978370

#SPJ1

4 0
1 year ago
The Fully Meets rating should be assigned when the spelling suggestion matches query intent
neonofarm [45]
Yes definitely absolutely
8 0
3 years ago
Differences between analog computer and hybrid computer​
aleksandrvk [35]

Answer:

Analog computers only work with continuous numerical data in analog quantities, digital computers can process both non-numerical and numerical data and a hybrid computer is a combination of both analog and digital. A hybrid computer has the accuracy of a digital computer paired with speed of an analog one.

5 0
2 years ago
Read 2 more answers
Other questions:
  • When you compose a message, you want your audience to find the information it needs quickly and to understand what it finds. You
    11·1 answer
  • Which is most likely a presentation file?
    8·1 answer
  • _____ are independent and not associated with the marketing efforts of any particular company or brand.​
    9·1 answer
  • With ____________________, you can insert and remove a device while the computer is running.
    11·1 answer
  • Devon would like to install a new hard drive on his computer. Because he does not have a SATA port available on his motherboard,
    7·1 answer
  • Who know's web Design
    12·1 answer
  • Defination of formula work sheet​
    15·1 answer
  • Suppose the cache access time is 10ns, main memory access time is 200ns, and the cache hit rate is 90%. Assuming parallel (overl
    10·1 answer
  • Which of the following is not a component of Power BI?
    5·1 answer
  • The terminology used to describe a possible path to resolution to a problem from one end to the other is called what?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!