I know it's newbie question but I really need some help. I am trying to create a while loop with an integer
temporary array on Xcode
for four numbers. On every loop I want to check the previous number and store it to my table until that fills the four numbers.The numbers that I want to randomize are between 2-5
.
So here is my thought for the start:
ans= arc4random()%4+2;
seq[]=ans;
counter=+1
while (uniq==true) {
ans=arc4random()%4+2;
}
Uniq=true
for(int i=0; I <4; i++)
If (ans=seq[i]){
Uniq==false
Seq[counter=ans]
Counter++}
I know that i am missing things. If someone can help me i will be gratefull