Advertisement
dumitreskw

Untitled

Dec 6th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. void citire(int v[][101], int &n, int &m){
  5. cin >> n >> m;
  6. for(int i=1;i<=n;i++){
  7. for(int j=1;j <=m;j++) cin >> v[i][j];
  8. }
  9. }
  10. void afisare(int v[][101], int n,int m){
  11. for(int i=1;i<=n;i++){
  12. for(int j=1;j <=m;j++) cout << v[i][j]<< " ";
  13. cout << endl;
  14. }
  15. }
  16.  
  17. int main()
  18. {
  19. int n,m,v[101][101],i,j,Max=0,poz=0;
  20. citire(v,n,m);
  21. for(i=1;i<=n;i++){
  22. for(j=1;j<=m;j++){
  23. if(v[i][j]>Max){
  24. Max=v[i][j];
  25. poz=i;
  26. }
  27. }
  28. }
  29. cout << "cel mai mare prost este "<< Max << " aflat pe linia " << poz;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement