Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- #define N 10
- int main ()
- {
- int tab[N];
- int *w=tab;
- srand(time(NULL));
- int *i=tab;
- for(; i<tab+N; i++)
- {
- *i=rand()%101;
- printf(" %d adres %p \n", *i, i);
- if(*w<*i)
- {
- w=i;
- }
- }
- printf("Najwiekszy element jest rowny %d i ma adres %p \n", *w, w);
- }
Advertisement
Add Comment
Please, Sign In to add comment