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
What does a sharp sign indicate when used in representing a pitch?
ziro4ka [17]
A sharp sign <span>(#) </span><span>indicates that a note is one half-tone or semitone step higher compared to a note without a </span>sharp<span>. </span>
5 0
3 years ago
Which of the following would an NSA professional most likely need?
lutik1710 [3]

Answer:

B.a high school diploma and some training

Explanation:

Undoubtedly, NSA professional requires limited education, and a high school diploma is enough for them. However, they will need some training related to security services as well. and only then they will be able to work as an NSA professional. Hence, having only a high school diploma is not enough, and the certificate will also not work. However, they also do not need a bachelor's degree. And they definitely need a high school diploma and some training. That is certainly going to be enough for becoming an NSA professional.

6 0
3 years ago
Read 2 more answers
Industry experts estimate about what percentage of communication is through body language?
OverLord2011 [107]
Communication is only 7 percent verbal and 93 percent non-verbal. The non-verbal component was made up of body language (55 percent) and tone of voice (38 percent).
This is what one of my teacher told me but I’m not 100% sure it’s right
7 0
2 years ago
Read 2 more answers
Juan is a network administrator and must set up a VPN for his company's network. To allow safe communication, he should
Mekhanik [1.2K]

Answer:

select Control Panel, then Network Protocols, then Internet

4 0
2 years ago
A programmer writes a for statement to count from 1 to 10 and explicitly mentions the 1 and the 10 in the for “header.” which re
o-na [289]
The relational operator used would probably be <=
6 0
2 years ago
Other questions:
  • Why is a DNS cache poisoning attack dangerous? Check all that apply. A. Errrr...it's not actually dangerous. B. It allows an att
    12·1 answer
  • Bitnet, one of the predecessors of the internet was launched in 1981. what does bitnet stand for?
    12·1 answer
  • If you specify a user without specifying a hostname, mysql will
    13·1 answer
  • Write a C++ program that determines if a given string is a palindrome. A palindrome is a word or phrase that reads the same back
    6·1 answer
  • Who invented the speaker?
    14·2 answers
  • Several new projects are being staffed by outside contractors who will be working on servers in the contractors’ office, not in
    5·2 answers
  • Mention 3 components that can be found at the back and front of the system unit​
    6·1 answer
  • Can you help me with my homework what should i do
    9·1 answer
  • From where do we get information or knowledge? Explain.
    12·2 answers
  • Different the policies and protocols in the industry
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!