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]
2 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]2 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
Where are my files shortcut in documents folder.
faust18 [17]

Answer: Search File Explorer: Open File Explorer from the taskbar or right-click on the Start menu, and choose File Explorer, then select a location from the left pane to search or browse. For example, select This PC to look in all devices and drives on your computer, or select Documents to look only for files stored there.

Explanation: hope this helps :)

4 0
2 years ago
A _____ cloud allows an organization to take advantage of the scalability and cost-effectiveness that a public cloud computing e
balu736 [363]

Answer:

Hybrid

Explanation:

Hybrid cloud is a solution that combines a private cloud with one or more public cloud services, with proprietary software enabling communication between each distinct service.

5 0
3 years ago
What is unique about the TODAY and NOW functions?
Degger [83]

Answer:

The formula does not require arguments.

Explanation:

One of the programs or software that runs on a computer is Microsoft Office programs. One of these programs is called Microsoft Excel. It is a spreadsheet program where calculations can be made, graphs, diagrams can be plotted and drawn as well.

In other to utilize Microsoft Excel properly, we make use of what we call FUNCTIONS. Functions in Microsoft Excel are defined as formulas, that have already been prepared or created before hand in the Microsoft Excel program so that we can be able to used Microsoft Excel properly and efficiently. Functions may or may not require ARGUMENTS to carry out necessary calculations.

An ARGUMENT is a number or variable that functions require to carry out or do their calculations.

Examples of the functions found in Microsoft Excel are the TODAY and NOW functions. These two functions are used in spreadsheets on Microsoft Excel with regards to Date and Time.

TODAY function is used to give us or update the current or present date while the NOW function gives us or updated the current date and time.

The uniqueness or similarities between the TODAY and NOW functions is that their formula do not require arguments.

3 0
2 years ago
Read 2 more answers
In this lab, 172.30.0.0 represents the __________ network and 10.20.1.0 represents the _________ network.
umka21 [38]
172.30.0.0: private network
10.20.1.0: public network
6 0
3 years ago
Summarize why understanding the differences between surface culture and deep culture may inform your knowledge, skills, and prof
lorasvet [3.4K]

Answer: By understanding the basic cultural values of the individual such as looks and talk. Also understanding the core values of the individual such as attitude, beliefs and religion. It would improve the behavior in your professional and cultural relationship with individuals in your workplace.

Explanation:

8 0
2 years ago
Other questions:
  • #The Fibonacci sequence is a number sequence where each #number is the sum of the previous two numbers. The first #two numbers a
    7·1 answer
  • The only requirement of __________ is that the sender must provide some mechanism whereby the receiver can opt out of future ema
    14·1 answer
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • What cell phone technology is the most popular in the united states?
    8·2 answers
  • You recently started working part-time in a retail store, and are learning about the reading devices your store uses. Your store
    10·1 answer
  • IT investments can lead to developing IT capabilities and dynamic IT competencies, which can lead to achieving the following six
    5·1 answer
  • A growling noise is heard only when the driver exerts force on the clutch pedal. No noise is heard when the clutch pedal is up.
    14·1 answer
  • Write a program whose input is two integers and whose output is the two integers swapped. Ex: If the input is: 38 then the outpu
    11·1 answer
  • The purpose of a database is to help people stop using spreadsheets.
    10·1 answer
  • B. What significant values have you learned while learning the tools and utensils?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!