well for one. You are missing your srand(time(NULL)) and for two making it so it will only pick a number twice is a bit more complicated than that.
You would have to check when a number is called and if it calls that number after the second time then to call another number until all numbers are called twice