Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n,m,a[101][101],val;
- cin>>n>>m;
- for(int i=1;i<=n;i++){
- for(int j=1;j<=m;j++){
- cin>>a[i][j];
- }
- }
- for(int i=1;i<=n;i++){
- val=-1;
- for(int j=1;j<=m;j++){
- if(a[i][j]<21 && a[i][j]>val){
- val=a[i][j];
- }
- }
- if(val!=-1){
- cout<<val<<endl;
- }
- else{
- cout<<"Nu exista\n";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement