Advertisement
rengetsu

ProcedurProgramavimas_2.08

Mar 12th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4. int main()
  5. {
  6. double q=0,r=0,k=0,sum=0,d=0;
  7. int f[11][11];
  8. cin>>q>>r>>k;
  9. for(int i=0;i<q;i++)
  10. {
  11.     for(int z=0;z<r;z++)
  12.     {
  13.     cin>>f[i][z];
  14.         if(z>=k)
  15.         {
  16.         sum+=f[i][z];
  17.         d++;
  18.         }
  19.     }
  20. }
  21.     if(d==0){cout<<"NO"<<endl;}else{cout<<sum<<endl;}
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement