Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int random(int a, int b)
- { int RANGE;
- RANGE = a-b;
- return rand() % RANGE + 1;
- }
- int main()
- {
- int N,MINs,MAXs,MINv,MAXv,SIZE,VALUE,WARTOSC,r;
- printf(" Podaj liczbe macierzy - N (od 1 do 100),\n Podaj minimalny rozmiar macierzy - MINs,\n Podaj maksymalny rozmiar macierzy - MAXs,\n Podaj minimalna wartosc macierzy- MINv,\n Podaj maksymalna wartosc macierzy - MAXv");
- scanf("%d%d%d%d%d",&N,&MINs,&MAXs,&MINv,&MAXv);
- r = random(MINs,MAXs);
- random(MAXs,MINs);
- printf("%d",&r);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement