objective c - for loop with two integers -


i'm new here. know, how use for loop 2 integers.

let's say:

for (int  x = 1, int y = 1; x <=200, y <=4; x++, y++) 

i need it, because have images on web server, following names:

1501.png, 1502.png, 1503.png, 1504.png

1511.png, 1512.png, 1513.png, 1514.png

as can see, last digit image name y , first 3 digits x.

i want use like:

[@"mywebsite/%i%i.png", x , y] 

any suggestion?

much clearer put 1 loop inside other:

for (int x = 1; x <=200; x++) {     for(int y = 1; y <=4; y++) {         // [@"mywebsite/%i%i.png", x , y]     } } 

i'd suggest more descriptive names x , y


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -