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
aleksley [76]
3 years ago
11

Given two 2x3 (2 rows, 3 columns) arrays of integer , x1 and x2, both already initialized , two integer variables , i and j, and

a boolean variable x1rules. write the code that is necessary for x1rules to be true if and only if every element in x1 is bigger than its corresponding element in x2 and is false otherwise
Computers and Technology
1 answer:
Gnesinka [82]3 years ago
7 0
JAVA programming was employed...

What we have so far:
* Two 2x3 (2 rows and 3 columns) arrays. x1[i][j] (first 2x3 array) and x2[i][j] (second 2x3 array) .
* Let i = row and j = coulumn.
* A boolean vaiable, x1rules

Solution:

for(int i=0; i<2; i++)
{
   for(int j=0; j<3; j++)
   {
      x1[i][j] = num.nextInt();
   }
}// End of Array 1, x1.

for(int i=0; i<2; i++)
{
   for(int j=0; j<3; j++)
   {
      x2[i][j] = num.nextInt();
   }
}//End of Array 2, x2
This should check if all the elements in x1 is greater than x2:

x1rules = false;
if(x1[0][0]>x2[0][0] && x1[0][1]>x2[0][1] && x1[0][2]>x2[0][2] && x1[1][0]>x2[1][0] && x1[1][1]>x2[1][1] && x1[1][2]>x2[1][2])
{
   x1rules = true;
   system.out.print(x1rules);
}
else
{
   system.out.print(x1rules);
}//Conditional Statement
You might be interested in
Convert the following 8­bit binary numbers in two's complement format to decimal (If the number is negative, include the minus s
olchik [2.2K]
Ahhh we rjfydyxtxyztxhxhxhxtzgxgxgxtxftxtxtxtxt gc
6 0
3 years ago
Dsl is an example of what type of internet access?.
iVinArrow [24]
Answer: Digital Subscriber Line (broadband connection)
8 0
2 years ago
2. It is the art of creating computer graphics or images in art, print media, video games.
vfiekz [6]
The answer is CGI :)
4 0
3 years ago
Which of these is NOT an example of lifelong learning?
oee [108]

Answer:

B. having lunch with a friend

Explanation:

Lifelong learning can be defined as a continuous, self-motivated, and self-initiated learning activity that is typically focused on personal or professional development. Thus, it's a form of education that is undertaken throughout life with the sole aim of pursuing knowledge, competencies, and skills for either personal or professional growth and development, especially after acquiring a formal education.

Some examples of lifelong learning includes the following;

I. Reading a trade magazine.

II. Reviewing a textbook.

III. Studying an encyclopedia.

7 0
3 years ago
Does anybody know where the picture in my pfp is from???
maksim [4K]

Answer:

Sailor moon and Sailor moon crystal

Explanation:

An anime from 1995-2000

6 0
3 years ago
Other questions:
  • The malicious use of computer code to modify the normal operations of a computer or network is called a ___ .
    13·1 answer
  • Tara and Zach are leading a systems development project and they want the investigation phase to go smoothly and quickly. They d
    5·1 answer
  • Vanessa and Marie are best friends. Vanessa tells Marie that one of their classmates has been posting nasty comments about Vanes
    10·2 answers
  • Explain The Two Way Communication in full.
    10·1 answer
  • A file with a com extension is most likely to be a(n) ___ file.
    13·2 answers
  • The getting started screen in Microsoft publisher consists of which main parts?​
    7·1 answer
  • Can anybody do Algorithm 2 for me (with Python).<br> Answer = 25 points.
    13·1 answer
  • When measuring processor speed,a megahertz is much faster than a gigahertz.true or fals
    12·1 answer
  • What is a fruitful function? Explain with help of programming example?<br> plz
    7·1 answer
  • In C++ please (read the image below for instructions)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!