Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int d,i;
- printf("podaj szukana wartosc w \n");
- scanf("%d",&d);
- int p=0;
- int tab[10];
- printf("a taraz wypelnij tablice dziesiecio elementowa \n");
- for (i=0;i<10;i++){
- scanf("%d",&tab[i]);
- // printf("\n");
- }
- for (i=0;i<10;i++)
- if(tab[i]==d){
- printf("element rowny w= %d stoi na %d miejscu",d,i+1); p=1;break;
- }
- if (p==0) printf("w tablicy niema elementu w rownego %d",d);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement