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
Liono4ka [1.6K]
3 years ago
12

g Given a 5 by 5 matrix of all positive values, write a program to find and display the greatest product of the 2 adjacent value

s in the vertical direction. For example, in the matrix below the greatest product of 2 adjacent values in vertical direction is 64 which is a product of mat(1,3) and mat(2,3).

Computers and Technology
1 answer:
Rom4ik [11]3 years ago
7 0

Answer:

Check the explanation

Explanation:

% iterate through each column (outer loop) , then iterate rows-1 (inner loop)

%take product of adjacent rows

mat = input('enter 5 by 5 matrix : ');

[R,C] = size(mat);

max_prod =0;

for c =[1:C]

for r=[1:(R-1)]

temp = mat(r,c)*mat((r+1),c);

if max_prod<temp

max_prod=temp;

end

end

end

fprintf('Greatest product : %i\n', max_prod)

Kindly check the output in the attached image below.

You might be interested in
Which website navigation method consists of a single web page containing a list of hyperlinks representing all the pages in the
SpyIntel [72]

Answer:

i think it's main menu!

Explanation:

when your on the main menu , you find everything your looking for or what it is you need to go too because ur on the home page! let me know if this helped!

7 0
3 years ago
Read 2 more answers
Code written by computer programmers is translated to binary code, so computers can understand the instructions. True or False
san4es73 [151]

Answer:

True

Explanation:

High-level languages such as Java, C++, Ruby, Python, etc need to be translated into binary code so a computer can understand it, compile and execute them.

Machine language is the only language that is directly understood by the computer because it is written in binary code. But writing codes in Machine Language is tiring, tedious, and obsolete as no one really uses it anymore.

7 0
3 years ago
How is a ink pen better than a digital pen.
Hatshy [7]
It depends on what digital pen you're using.
Ink pens are better because they don't run out of ink like digital and you dont have to re-charge every time.
Hope this helps!:)<span />
8 0
4 years ago
Flexibility and cost reduction are advantages generally associated with ? networks.
ahrayia [7]

Answer:

Wireless networks

Explanation:

Wireless networks provide more configuration flexibility and are less expensive. Companies that add employees will greatly benefit from the flexibility of wireless connections. Workstations can be moved with ease without the effort and cost required to run wires and cables. It is the best for network expansion since companies can add users quickly and grow their networks cost-effectively.

7 0
3 years ago
A(n) ________ is a light-sensitive material used to make a chip.
RSB [31]
The photoresist is a light-sensitive material used to make a chip. Photoresists can likewise be uncovered by electron shafts, creating an indistinguishable outcomes from introduction by light. The primary distinction is that while photons are consumed, storing all their vitality without a moment's delay, electrons store their vitality bit by bit, and scramble inside the photoresist amid this procedure.
3 0
4 years ago
Other questions:
  • When a process becomes digital, it often becomes cheaper and the workflow becomes simpler. True False
    5·2 answers
  • Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assista
    8·1 answer
  • Carly is part of a community of developers. In her free time, she works on code to improve this open-source operating system. Th
    11·1 answer
  • Assume that the following variables have been defined in a program: int x = 10; int y = 20; int z = 30; Write a cout statement t
    11·1 answer
  • bro this scared me, i thought i just got hacked, could someone explain why when i went to ask a question, it kicked me out my ac
    9·2 answers
  • Hard and soft skills can both be transferable skills. *<br><br> True<br><br> False
    5·2 answers
  • Write a program that prompts the user to enter two positive integers less than 1,000,000,000 and the program outputs the sum of
    15·1 answer
  • The steps.txt file contains the number of steps a person has taken each day for a year. There are 365 lines in the file, and eac
    12·1 answer
  • Please help ASAP !!!
    15·1 answer
  • Find the name of the professor with the maximum percentage of students that failed his course.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!