Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int somme(int *tableau, int tailleTableau);
- int main(int argc, char *argv[])
- {
- int tableau[4] = {10, 15, 3, 22};
- somme(tableau, 4);
- return 0;
- }
- int somme(int *tableau, int tailleTableau)
- {
- int somme = 0;
- int i;
- for (i = 0 ; i < tailleTableau ; i++)
- {
- somme = somme + tableau[i];
- printf("%d", somme);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement