Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. int main() {
  7. // your code goes here
  8. double a, sum[5]={0, 0, 0, 0, 0};
  9. const int n = 5;
  10. for(int i=0; i<n; i++){
  11. for(int j=0; j<n; j++){
  12. cin>>a;
  13. sum[i]+=a;
  14. }
  15. }
  16.  
  17. for( int i=0; i<n; i++){
  18. cout <<fixed <<setprecision(4) <<sum[i] <<' ';
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement