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]
4 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]4 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
Dot Notation can be used with lower(), upper() or str() string methods. true or false
Akimi4 [234]

Answer:

The answer is "True".

Explanation:

Dot notation is a part of the programming language. This notation includes Python and other oops language to look in front of the point to execute code.

  • This may access the specific version of a specific function, which is specified in a different class or section, using dot notation.
  • This notation is used with a String method or string object that is immutable. This means that after constructing, they can not be modified.
  • To access any member of an object we use dot notation. That's why this statement is true.

4 0
3 years ago
What is the term for the era created by the digital revolution?<br>​
puteri [66]

Answer:

The Digital Revolution also marks the beginning of the Information Era. The Digital Revolution is sometimes also called the Third Industrial Revolution.

Explanation:

Hope this Helps.

5 0
3 years ago
The nonvolatile, permanent memory that remains in the computer even when it is turned off is called:
Rainbow [258]
ROM = Read Only Memory
4 0
3 years ago
Read 2 more answers
Why are security measures protecting gdp data so strict?
Semenov [28]
The stock market would behave very differently if people had easy access to that data.
7 0
4 years ago
int) You are the head of a division of a big Silicon Valley company and have assigned one of your engineers, Jim, the job of dev
sergeinik [125]

Answer:

Correct option is E

Explanation:

a) 2n^2+2^n operations are required for a text with n words

Thus, number of operations for a text with n=10 words is 2\cdot 10^2+2^{10}=1224 operation

Each operation takes one nanosecond, so we need 1224 nanoseconds for Jim's algorithm

b) If n=50, number of operations required is 2\cdot 50^2+2^{50}\approx 1.12589990681\times 10^{15}

To amount of times required is 1.12589990681\times 10^{15} nanoseconds which is

1125899.90685 seconds (we divided by 10^{9}

As 1$day$=24$hours$=24\times 60$minutes$=24\times 60\times 60$seconds$

The time in seconds, our algortihm runs is \frac{1125899.90685}{24\cdot 60\cdot 60}=13.0312 days

Number of days is {\color{Red} 13.0312}

c) In this case, computing order of number of years is more important than number of years itself

We note that n=100 so that 2(100)^2+2^{100}\approx 1.267650600210\times 10^{30} operation (=time in nanosecond)

Which is 1.267650600210\times 10^{21} seconds

So that the time required is 1.4671881947\times 10^{16} days

Each year comprises of 365 days so the number of years it takes is

\frac{1.4671881947\times 10^{16}}{365}=4.0197\times 10^{13} years

That is, 40.197\times 10^{12}=$Slightly more than $40$ trillion years$

4 0
4 years ago
Other questions:
  • Layla is purchasing a new laptop from an online vendor. Which of the following will be displayed in the address bar of his brows
    12·1 answer
  • Which fingers do you use to type the following letters rtgvf
    11·1 answer
  • Create a cell reference in a formula by typing in the cell name or
    7·2 answers
  • Your computer is crashing on a regular basis. Which of the following is an operation available to the user that should help rese
    6·2 answers
  • How can u get this off us keybored chromme book
    6·1 answer
  • What types of issues can you most likely resolve by knowing how to access and use the control panel choose all that apply?
    10·1 answer
  • When you sustain program implementation by staying true to the original design, it is termed A. Goals and objectives B. Program
    10·1 answer
  • You can change the size of text using which block of code?
    11·1 answer
  • Can a syntax error occur in a block-based code? Why or why not?
    12·2 answers
  • String objects are modified with string slices true or false
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!