I have multiple IPAddresses, ranging from xxx.xx.xxx.11
to xxx.xx.xxx.50
.
For IPAddress .11
, I want to assign the string "A01"
to the variable cabine
.
to IPAddress .12
, the string "A02"
etc up to .30
("A20"
)
Then, from IPAddress .31
, I want to asisgn the string "B01"
, .32
"B02"
etc all the way to .50
"B20"
.
Although I am an absolute beginner, I thought this cannot be that hard but it just doesn't want to work!
I thought of programming it with a for loop, something like this:
for (i = 11; i < 51; i++) {
cabine = A and something with i;
}
But I would need two different loops because of the different letters (A, B) right? Thanks in advance for any help!