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

Pubblicato il: 18 agosto 2019
sul canale di: 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.


In questa pagina del sito puoi guardare il video online NPTEL | The Joy of computing using Python | WEEK 4| Programming Assignment-2: Matrix della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Ultimate Gamer 18 agosto 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 6,116 volte e gli è piaciuto 26 spettatori. Buona visione!