Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main(int argc, char *argv[]) {
- int tab[6],i,x;
- srand(time(NULL));
- for(i=0;i<6;i++)
- tab[i]=rand()%21;
- printf("Podaj liczbe: ");
- scanf("%d",&x);
- for(i=0;i<6;i++){
- if(tab[i]==x){
- printf("Liczba %d wystepuje w tablicy",x);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement