Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- double SumaElementowTablicy(double t[]);
- int main( void )
- {
- double tab[] = {0.5, 15.3, 7.5, 8.4, 2.2};
- printf("%f",SumaElementowTablicy(tab));
- return 0;
- }
- double SumaElementowTablicy(double t[])
- {
- double suma = 0;
- for(int i = 0; i < 5; i++)
- {
- suma += t[i];
- }
- return suma;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement