Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {float a[20][30];
- int i,j,m,n,k,maxim;
- cout<<"Nr de linii="; cin>>m;
- cout<<"Nr de coloane="; cin>>n;
- for(i=1;i<=m;i++)
- for(j=1;j<=n;j++)
- {cout<<"a["<<i<<"]["<<j<<"]=";
- cin>>a[i][j];}
- for(i=1;i<=m;i++)
- {for(j=1;j<=n;j++)
- cout<<a[i][j]<<" ";
- cout<<endl;}
- cout<<"K="; cin>>k;
- maxim=a[k][1];
- for(j=1;j<=n;j++)
- if(a[k][j]<a[k][j+1])
- maxim=a[k][j+1];
- cout<<"Nr maxim din coloana "<<k<<" este "<<maxim;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement