Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdio.h"
- #include "conio.h"
- int somme(int T[50],int N,int s){
- int i;
- s=0;
- for(i=0;i<N;i++){
- s=s+T[i];
- }
- return(s);
- }
- int main(void)
- {
- int T[50];
- int N;
- int Ss;
- int i;
- printf("donner N: ");
- scanf("%d",&N);
- for(i=0;i<N;i++){
- printf("donner l'élèment de l'indice %d: ",i+1);
- scanf("%d",&T[i]);
- }
- printf("%d\n",somme(T,N,Ss));
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement