Advertisement
ivosexa

Untitled

Dec 20th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int sum( int q, int w, int e, int r, int t)
  4. {
  5. int y;
  6. y=q+w+e+r+t;
  7. return y;
  8. }
  9.  
  10. int main ()
  11. {
  12. int x,y;
  13. int a[5];
  14. for(x=0; x<5; x++)
  15. {
  16. printf("vuvedi %d chislo (%d ot obshto 5) \n",(x+1),(x+1));
  17. scanf("%d",&a[x]);
  18. }
  19. y=sum(a[0], a[1], a[2], a[3], a[4]);
  20. printf("sumata na tezi 5 chisla e %d \n", y);
  21.  
  22. system ("pause");
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement