Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- using namespace std;
- int main()
- {
- int n,i,j,x,c;
- double s=0;
- cin>>n;
- for(i=1;i<=n;i++)
- {
- for(j=1;j<=n;j++)
- {
- cin>>x;
- if(i<j&&x>0)
- {
- s=s+x;
- c++;
- }
- }
- }
- if(s!=0)
- {
- cout<<fixed<<setprecision(2)<<s/c;
- }
- else
- {
- cout<<"NU EXISTA";
- }
- return 0;
- }
- 88
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement