- 4

write a program that prints all numbers from 0 to the inputted number that are either a multiple of 3 or end with 3

Java

22nd Oct 2020, 5:45 PM
Carlton
9 Réponses
+ 6
Carlton , please present your try here first, so that we can see what problem do you have. Please don't ask us to do your homework. Thanks!
22nd Oct 2020, 6:21 PM
Lothar
Lothar - avatar
+ 3
Carlton , the code you presented here is not related to the task you have mentioned in your question. please do a try by yourself and then post it here again. Thanks!
22nd Oct 2020, 6:45 PM
Lothar
Lothar - avatar
0
https://code.sololearn.com/cpA6QW7dOALt/?ref=app I just need help with the multiple of 3 and the end with 3 part
22nd Oct 2020, 6:40 PM
Carlton
0
Hey I am going and figure it out reworking my way up I am rushing into this only at it for about a month now But I'll get back to you
22nd Oct 2020, 6:57 PM
Carlton
0
I have a try with your code but i dont know how to convert integer to string in java .either i can select the last number of the input x and make conditionalhttps://code.sololearn.com/cK16wLTagC6u/?ref=app statement if that num == 3
22nd Oct 2020, 7:35 PM
HBhZ_C
HBhZ_C - avatar
0
That's the out kind of out put I was going for I was misinterpreted the question Thank you
22nd Oct 2020, 8:03 PM
Carlton
0
I don't understand when I run the same program on my computer the only out put I get is the input number but it runs good on the app
22nd Oct 2020, 9:48 PM
Carlton
0
Congrat it is a good idea to use %10 .I think in computer compiler will be confused about System .out.println(x) that belong to if statement or not so curly brackets remove confusion.
22nd Oct 2020, 10:06 PM
HBhZ_C
HBhZ_C - avatar