Collection Details
Namespace:
neofrost
Dataset:
Collection:
Matrix2
Owner:
0xd834389c7a26ca4412f5abdde7bf4731d5740938
Timestamp:
Nov.25.2023 12:42:00 PM
Status:
OnChain
Collection Documents
_idTrisView
feef1d4a5bb84830aaf83b7b62376dcccfc7562ad688e996381d91db886ce7161
#include <stdio.h> int main() { int i, j; int col, row; printf("Nhap so cot cua ma tran: "); scanf("%d", &col); printf("Nhap so hang cua ma tran: "); scanf("%d", &row); // khoi tao ma tran int matrix[col][row]; printf("Nhap cac phan tu cua ma tran: \n"); for (i = 0; i < row; i++) { for (j = 0; j < col; j++) { printf("matrix[%d][%d] = ", i, j); scanf("%d", &matrix[i][j]); } } printf("Cac phan tu cua ma tran: \n"); for (i = 0; i < row; i++) { for (j = 0; j < col; j++) { printf("%d ", matrix[i][j]); } printf("\n"); } return 0; }
View