Dev C Multiplication Table

  • Related Questions & Answers
  • Selected Reading
C++ProgrammingServer Side Programming

Dev C Multiplication Table Le Program

I am self studying C from Robert Lafore's OOP in C. I am solving the first exercise questions of chapter-3 loop and decisions. Generating formatted multiplication tables in C. Ask Question Asked 3 years. $begingroup$ @Tim I am using dev C. It uses MinGW GCC 4.6.2 32-bit compiler. It somehow still allows me to use conio.h. Contribute your code and comments through Disqus. Previous: Write a program in C# Sharp to display the cube of the number upto given an integer. Next: Write a program in C# Sharp to display the multiplication table vertically from 1 to n.

Table

A matrix is a rectangular array of numbers that is arranged in the form of rows and columns.

An example of a matrix is as follows.

A 3*2 matrix has 3 rows and 2 columns as shown below −

A program that performs matrix multiplication is as follows.

Example

In the above program, the two matrices a and b are initialized as follows −

If the number of columns in the first matrix are not equal to the number of rows in the second matrix then multiplication cannot be performed. In this case an error message is printed. It is given as follows.

Both the matrices a and b are displayed using a nested for loop. This is demonstrated by the following code snippet.

Dev C Multiplication Table 1

After the product is obtained, it is printed. This is shown as follows.