int reqNum = 4;
fun(){
int randNum = randomNumber(1,8); // Generates a random number from 1 to 8
if (randNum == reqNum){
return;
}
else{
fun();
}
}
what's the worst case of this?
it's gonna keep calling itself over and over till the random number is equal to the reqNum.