NPTEL | The Joy of computing using Python | WEEK 4| Programming Assignment-2: Matrix

Veröffentlicht am: 18 August 2019
auf dem Kanal: Ultimate Gamer
6,116
26

You are provided with the number of rows (R) and columns (C). Your task is to generate the matrix having R rows and C columns such that all the numbers are in increasing order starting from 1 in row wise manner.

Input Format:
The first line contain two numbers R and C separated by a space.

Output Format:
Print the elements of the matrix with each row in a new line and elements of each row are separated by a space.

NOTE: There should not be any space after the last element of each row and no new line after the last row.

Example:

Input:
3 3

Output:
1 2 3
4 5 6
7 8 9

Explanation:
Starting from the first row, the numbers are present in the increasing order. Since it's a 3X3 matrix, the numbers are from 1 to 9.


Auf dieser Seite können Sie das Online-Video NPTEL | The Joy of computing using Python | WEEK 4| Programming Assignment-2: Matrix mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Ultimate Gamer 18 August 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 6,116 Mal angesehen und es wurde von 26 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!