Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
Remainder in switch
Why does the output of attached code only give numbers to 100 instead of the asked strings? It seems it doesnt run the switch loop? :s https://code.sololearn.com/WLLNHLQP3zz4/?ref=app
2 Antworten
+ 10
Try this
switch(true){
case(i%3==0): ... }
or
switch(i%3){
case(0): ... }
0
Oke :D thanks alot. Gonna try other approach