Advertisement
edutedu

problema 3 4bac

May 15th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. int a[50][50], m, n, i, j, k, s=0;
  2. cout<<"n="; cin>>n;
  3. cout<<"m="; cin>>m;
  4. for(i=1; i<=n; i++)
  5. for(j=1; j<=m; j++)
  6. cin>>a[i][j];
  7. cout<<"Introduceti un numar cuprins intre 0 si n"; cin>>k;
  8. for(j=1; j<=m; j++)
  9. {
  10. if(a[k][j]>0)
  11. s=s+a[k][j];
  12. }
  13. uc=s%10;
  14. cout<<uc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement