Advertisement
Guest User

Untitled

a guest
Nov 28th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int t;
  7. cin>>t;
  8. int suma=0,liczba;
  9. if((t>0)&&(t<100)){
  10. for(int i=1;i<=t;i++)
  11. {
  12. int x;
  13. cin>>x;
  14. for(int j=1; j<=x;j++)
  15. {
  16. cin>>liczba;
  17. suma+=liczba;
  18.  
  19. }
  20. cout<<suma;
  21. suma=0;
  22.  
  23. }}
  24. else
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement