0
print 1 to 10 numbers using if condition but escape 8th number in the row
2 odpowiedzi
+ 4
Just use a loop, much easier:
for(int i = 1; i <=10; i++){
if(i != 8 ){
//print i
}
}
+ 1
Or use the modulus operator to print out each 8th element in a row if your row has more than, let's say 16