0
Help Java Loop [SOLVED]
The program supposed to print the number input and decrease it down to 0 skipping numbers that are a multiple of 3 but my code doesn't skip those numbers. Help please https://code.sololearn.com/c4q6cSBbkcGg/?ref=app
4 Antworten
0
if(number==0){
System.out.println(number);
number--;}
else{
//My previous answer
}
+ 1
Change the code like below:
if (number % 3 == 0){
number--;
continue ;
}
System.out.println (number);
number--;
0
It now doesn't print 0
0
for(int i =input ; i>=0 ; i--){
if(i%3==0){
continue;
}
else{
print(i);
}
}