Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void test(int x)
- {
- if(x%2==0)
- {printf("Il est pair \n");}
- else
- {printf("Il est impaire \n");}
- }
- int main()
- {
- int N,i;
- printf("Quelle taille ? : ");
- scanf("%d",&N);
- int tab[N];
- for(i=0;i<N;i++)
- {
- printf("Donnez la valeur %d :",i+1);
- scanf("%d",&tab[i]);
- test(tab[i]);
- }
- getchar();
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement