Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class macierz
  6. {
  7. int n,m;
  8. int tab[11][11];
  9.  
  10. public:
  11. macierz(){}
  12.  
  13. friend istream&operator>>(istream&in, macierz&m)
  14. {
  15. for(int i=0;i<n;++i)
  16. for(int j=0;j<m;++j)
  17. in>>m.tab[i][j];
  18. for(int i=0;i<n;++i)
  19. for(int j=0;j<m;++j)
  20. return in;
  21. }
  22.  
  23. friend macierz operator*(macierz m,float a)
  24. {
  25. for(int i=0;i<n;++i)
  26. for(int j=0;j<m;++j)
  27. {
  28. m.tab[i][j]=m.tab[i][j]*a;
  29. m.tab[i][j]=a*m.tab[i][j]
  30. }
  31. return macierz m;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement