vendredi 15 décembre 2017

How to loop only in if statement?

I want to do this :

for ()
{ 
   if() 
   {
     'do smthing';
   } 
}
else 
{
   'do smthing else';
}

(I want to keep the 'if-else' structure but I want the 'for' loop to loop only in the 'if' statement)

Can somebody help me please ?

Thank you in advance, and sorry if my question is a stupid one :)

Aucun commentaire:

Enregistrer un commentaire