Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- void monitor(int* p);
- /////////////////////////////////////////////////////////////////
- int main() //
- {
- srand(time(0));
- int v = 7,
- nCounter = 0;
- int array[10];
- for(int i = 0; i < 10; i++)
- {
- array[i] = rand()%200;
- }
- monitor(array);
- printf("The last element in the array = %d ?\n", v);
- for(int i = 0; i < 10; i++)
- {
- if (array[i]<v)
- {
- nCounter ++;
- }
- }
- }
- /////////////////////////////////////////////////////////////////
- void monitor(int* p) //
- {
- for (int i = 0; i < 10; i++)
- {
- printf("%d ,", p[i]);
- } printf("\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement