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
Mademuasel [1]
3 years ago
14

Create a new class MyArray_DE and copy and paste the previous program. Be sure to rename the class to MyArray_DE. Modify the pro

gram so that it sums up only the even numbers. PART E. At the end of the program, write a FOR loop that prints the array in reverse (you are not reversing the array; you are simply printing it). Test your program with all the above test cases.
Computers and Technology
1 answer:
vova2212 [387]3 years ago
4 0

Answer:

public class MyArray_DE

{

public static void main(String[] args) {

    int[] numbers = {28, 7, 92, 0, 100, 77};

    int total = 0;

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

        if(numbers[i] % 2 == 0)

            total += numbers[i];

    }

 System.out.println("The sum of even numbers is " + total);

 System.out.println("The numbers in reverse is ");

 for (int i=numbers.length-1; i>=0; i--){

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

    }

}

}

Explanation:

Since you did not provide the previous code, so I initialized an array named numbers

Initialize the total as 0

Create a for loop that iterates through the numbers

Inside the loop, if the number % 2 is equal to 0 (That means it is an even number), add the number to total (cumulative sum)

When the loop is done, print the total

Create another for loop that iterates through the numbers array and print the numbers in reverse order. Note that to print the numbers in reverse order, start the i from the last index of the array and decrease it until it reaches 0.

You might be interested in
Armando is trying to decide how he will alert players that the game is over in the new video game that he is designing. He is co
mojhsa [17]

Answer:

He is working on the outcome

Explanation:

Because this is the outcome if you fail or die and the other objectives are the following

operation: A single objective in a level of the the whole game

obstacles: Trying to stop the player like blocks or walls or traps

objective:The main goal of the game

8 0
2 years ago
TQ Sustainability &amp; Technology
harkovskaia [24]

A way to make the metro system more sustainable is to use machine learning so as to optimize the frequency of train routes  using passenger load.

<h3>What is a sustainable transport system?</h3>

This sustainable transport system is known to be a kind of system that aids the basic access and growth needs of the society to be met rightly and safely.

This also should be meant in a way that is consistent with human and ecosystem health, and boast equity in all successive generations.

Other methods are the use of Cooling System to lower temperature and non waste of Energy and also lower the Noise Levels.

learn more about Sustainability from

brainly.com/question/25032305

4 0
2 years ago
Which sns gets its names from one of its unique features
Komok [63]

Answer:

no

Explanation:

3 0
3 years ago
Mark each statement as true or false: a. PATA hard drives are older and slower than SATA hard drives. b. SATA1 is about 10 times
deff fn [24]

Answer:

The answer to this question can be described as follows:

a) True

b) False

c) False

d) False

e) False

f) True

Explanation:

In option a,  PATA device is used to connect the hard drives into systems.  Its title suggests, depends on parallel transmitting technology, contrasted to the compulsive-signaling tools.

In option b, SATA1 is a first-generation device, and SATA3 third generation, that's why it is wrong.

In option c and option d, both were wrong because RAID 0 and RAID 5 are Cloud computing software for storing data.

In option e, An internal SATA data cable with an eSATA port can not be used as an additional connection is provided by the eSATA port.

In option f, It is true because there are 7 pins in internal SATA.

6 0
3 years ago
When an individual user works in _____, the workstation performs all the functions of a server by storing, accessing, and proces
anyanavicka [17]
When an individual user works in stand-alone mode, the workstation performs all the functions of a server by storing, accessing, and processing data as well as providing a user interface.​
4 0
3 years ago
Other questions:
  • a computer that no longer works after having minor repair work done to it may have been damaged by ______.
    6·1 answer
  • Which is an example of static web page??
    9·2 answers
  • A _______ is conducted to determine the adequacy of system controls, ensure compliance with established security policy and proc
    10·1 answer
  • What is netbeans and what is it for??
    9·1 answer
  • Write a program that will generate 100 integers between 0 and 1000. Store the even numbers in a sorted linked list called evens.
    12·1 answer
  • A Raycast returns a float that tells you how far away an Object is
    8·1 answer
  • Computer privacy typically occurs when which of the following is violated?
    6·1 answer
  • MORE FREEE POINTS AYEEE
    7·2 answers
  • During her presentation, Marie wanted more freedom to move about the room and interact with her audience. She can use _____.
    10·1 answer
  • What are storage devices ​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!