dotfiles/.config/Code/User/History/21fc77b3/MDaE.cpp
RafayAhmad7548 ab03d5f10c test
2024-06-16 18:53:25 +05:00

38 lines
No EOL
537 B
C++

/*
Rafay Ahmad
23I-2526
*/
#include <iostream>
using namespace std;
class Matrix{
int rows;
int cols;
int **matrix;
public:
Matrix(int rows, int cols) : rows(rows), cols(cols){
matrix = new int*[rows];
for(int i=0;i<rows;i++) matrix[i] = new int[cols];
input();
}
void input(){
cout<<"Enter values: ";
for(int i=0;i<rows;i++){
for(int j=0;j<cols;j++){
cin>>matrix[i][j];
}
}
}
};
int main(){
return 0;
}