Answer: The correct answer is A. I just answered this question myself!
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.
Answer:
click on the slide in normal view and press delete
Explanation:
i don't know if this is right but you can click edit and delete it like that.
The distinction between "computer architecture" and "computer organization" has become very fuzzy, if no completely confused or unusable. Computer architecture was essentially a contract with software stating unambiguously what the hardware does. The architecture was essentially a set of statements of the form "If you execute this instruction (or get an interrupt, etc.), then that is what happens. Computer organization, then, was a usually high-level description of the logic, memory, etc, used to implement that contract: These registers, those data paths, this connection to memory, etc.
Programs written to run on a particular computer architecture should always run correctly on that architecture no matter what computer organization (implementation) is used.
For example, both Intel and AMD processors have the same X86 architecture, but how the two companies implement that architecture (their computer organizations) is usually very different. The same programs run correctly on both, because the architecture is the same, but they may run at different speeds, because the organizations are different. Likewise, the many companies implementing MIPS, or ARM, or other processors are providing the same architecture - the same programs run correctly on all of them - but have very different high - level organizations inside them.
32-bit is the correct answer to this question.