Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class macierz
- {
- int n,m;
- int tab[11][11];
- public:
- macierz(){}
- friend istream&operator>>(istream&in, macierz&m)
- {
- for(int i=0;i<n;++i)
- for(int j=0;j<m;++j)
- in>>m.tab[i][j];
- for(int i=0;i<n;++i)
- for(int j=0;j<m;++j)
- return in;
- }
- friend macierz operator*(macierz m,float a)
- {
- for(int i=0;i<n;++i)
- for(int j=0;j<m;++j)
- {
- m.tab[i][j]=m.tab[i][j]*a;
- m.tab[i][j]=a*m.tab[i][j]
- }
- return macierz m;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement