Answer to Question #252947 in C++ for aro

Question #252947

 Write the pseudocode for a program that uses a two-dimensional array to compute and display  the multiplication table shown below. The user should decide the value of n in the example  below its 6: (5 Marks) * 1 2 3 4 5 6 

1 2 2 3 4 5 6 

2 2 4 6 8 10 12 

3 3 6 9 12 15 18 

4 4 8 12 16 20 24 




1
Expert's answer
2021-10-18T06:44:59-0400
// N - number of rows
// M - number of cols
// table[N + 1][M + 1] - multiplication table
for i in {0, N + 1}
  for j in {0, M + 1}
    table[i][j] = i * j;
// print header
print "* "
for j in {1, M + 1}
  print "${j} "
// print table
for i in {1, N + 1}
  print "${i} " // row
  for j in {1, M + 1}
    print "${table[i][j]} "
  print "\n"

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS