Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int* sed(int a[], int s, int b)
- {
- int *pa;
- for (int i = 0; i < s; i++)
- {
- a[i] = rand() % 90 + 10;
- if (a[i] == b)
- {
- pa = &a[i];
- return pa;
- }
- }
- pa = NULL;
- return pa;
- }
- void kolos1()
- {
- int a[20];
- int s;
- int b;
- int *ptr= (sed(a, 20, 10));
- if(ptr!=NULL)
- {
- printf("%d",*ptr);
- }
- else
- {
- printf("NULL" );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement