Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- #include<sstream>
- using namespace std;
- class matrix
- {
- int*wsk;*temp;
- int x,y;
- public:
- void create_matrix(){
- wsk=new int[x];
- for(int i=0;i<x;i++){
- wsk[i]=new int[y];
- }
- for(int i=0;i<x;i++){
- for(int j=0;j<y;j++){
- wsk[i][j]=0;
- }
- }
- matrix(int_x,int_y){
- this->x=_x;
- this->y=_y;
- }
- }
- }
- void change_element(){
- int a,b;
- cout<<"write coordination x,y";
- cin>>a;
- cin>>b;
- int value;
- cout<<"give new valuse";
- cin>>value;
- wsk[a][b]=value;
- }
- string representation(){
- int a,b;
- string element;
- cout<<"write x,y:";
- cin>>a;
- cin>>b;
- ?????????????????? a;/////////////////////////////
- a<<wsk[a][b];
- element=?????.str();/////////////////////////////
- return element;
- }
- void add1(){
- for(int i=0;i<x;i++){
- for(int j=0;j<x;j++){
- wsk[i][j]++;
- }
- }
- }
- void transponuj(){
- temp=new int[y];
- for(int i=0;i<y;i++){
- temp[y]=new int[x];
- }
- }
- for(int i=0;i<x;i++){
- for(int j=0;j<y;j++){
- wsk[i][j]=temp[j][i]'
- }
- }
- if(x!=y){
- wsk=new int[y];
- for(int i=0;i<y;i++){
- wsk[i]=new int[x];
- }
- for(int i=0;i<x;i++0){
- for(int j=0;j<y;j++0){
- wsk[i][j]=temp[i][j];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement