I am planning to create a simple bulls and cows( also know as mastermind board game) in C.The computer is supposed to make 4 digit code in which the allowed digits are 1,2,3,4,5,and 6 ! 0,7,8,9 are to omitted !! How do I make the computer create such a 4 digit number? I know about rand() function !! But how do I make it omit those 4 digits?