Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int tab[10];
- int i=0,j=0,w=0;
- do{
- printf("podaj elemnt\n");
- scanf("%d",&tab[i]);
- i=i+1;
- }
- while(i<10);
- for(i=0;i<10;i++)
- for(j=1;j<10;j++)
- if(j!=i) if(tab[i]==tab[j]){
- w=1;
- break;
- }
- if(w==1) printf("elementy w tablicy sie powtarzaja");
- else printf("tablica ma różnowartościowe elementy");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement