Guest User

rjesenje

a guest
Oct 26th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int funkcija_suma(int p[])
  6. {
  7.     int suma=0;
  8.     for(int i=0;i<10;i++)
  9.     {
  10.         suma+=p[i];
  11.     }
  12.     return suma;
  13. }
  14. int main()
  15. {
  16.     int p[10];
  17.     for(int i=0;i<10;i++)
  18.     {
  19.         cin>>p[i];
  20.     }
  21.     cout<<funkcija_suma(p)<<endl;
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment