PYTHON PROGRAM
r = int(input("Enter number of rows:"))
c= int(input("Enter number of columns:"))
matrix = []
print("Enter",r*c,"elements of matrix:")
for i in range(r):
a =[]
for j in range(c):
a.append(int(input()))
matrix.append(a)
print("Enterd matrix is:\n")
for i in range(r):
for j in range(c):
print(matrix[i][j], end = " ")
print("\n")
No comments:
Post a Comment
let me know which type examples you want to comment me.