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=0,r=0, didz=-1000001, ats;
- int sum=0, f[11][11], u=99;
- cin>>q>>r;
- for(int i=0;i<q;i++)
- {
- for(int z=0;z<r;z++)
- {
- cin>>f[i][z];
- if(f[i][z]>didz)
- {
- didz=f[i][z];
- u=i;
- }
- }
- }
- for(int j=0;j<r;j++)
- {
- sum+=f[u][j];
- }
- ats=sum/r;
- cout<<fixed<<setprecision(2)<<ats<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement