Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- double q,k=0,sum=0,d=0,w=0;
- int f[11][11];
- cin>>q;
- for(int i=0;i<q;i++)
- {
- if(i!=0){w++;}
- for(int z=0;z<q;z++)
- {
- cin>>f[i][z];
- if(i!=0 && z<q-(q-w))
- {
- sum+=f[i][z];
- d++;
- }
- }
- }
- if(d==0){cout<<"No"<<endl;}else{cout<<sum<<endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement