Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You have just been offered your first big software contract. The scope of work i

ID: 3858194 • Letter: Y

Question

You have just been offered your first big software contract. The scope of work is to create a tool for grade school students to learn their times tables. In this program, you will create a 10 times 10 2D array grid of times tables as a cheat sheet for the students to learn. This will display the values of the times tables all the way from 1 times 1 - 10 times 10. Make use of formatting tools like inserting tabs, setwidth(), or other formatting to keep the columns nice and neat! This table must be generated using multiplication and for loops. Do not just initialize the table into the array and simply print it out. The answers must be generated from nested for loops ranging to ten elements. Use multiplication and the nested structure to generate the pattern.

Explanation / Answer

#include<iostream>

using namespace std;
int main() {
   int mul_table[10][10];
   for (int i = 0; i < 10; i++) //create table
       for(int j = 0; j < 10; j++)
           mul_table[i][j] = (i+1)*(j+1);

  
   for (int i = 0; i < 10; i++) { //display table
       for(int j = 0; j < 10; j++)
           cout<<mul_table[i][j]<<" ";
       cout<<endl;
   }
}

I hope this code helps you.. let me know if you need any changes in the code!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote