Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int pitaj(int x) {
- static int broj;
- static int cnt = 0;
- if (++cnt == 1) {
- srand(time(0));
- broj = rand();
- }
- if (x < broj) return -1;
- if (x > broj) return 1;
- printf("tocno! broj pitanja: %d\n", cnt);
- exit(0);
- }
- int main() {
- // ovdje ti dopuni
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement