Tomki

Function

Mar 1st, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. void input_matr(int a[][20],int *n, int *m)
  2. {
  3. int (*u)[20],*uj;
  4. do
  5. {
  6. cout << "Введите количество столбцов и строк матрицы А:" << endl;
  7. cin >> *m >> *n;
  8. }
  9. while(*n<0 || *m<0 || (*n)*(*m)<5);
  10. cout << endl;
  11. cout << "Введите элементы матрицы"<< endl;
  12. for(u=a;u<a+*n;u++)
  13. for(uj=*u;uj<*u+*m;uj++)
  14. cin >> *uj;
  15. cout << "Матрица A:"<< endl;
  16. for(u=a;u<a+*n;u++)
  17. {
  18. for(uj=*u;uj<*u+*m;uj++)
  19. cout << *uj << " " ;
  20. cout << endl;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment