# How do i recognize 2 digits as separated digits ?

So basically the assignment says i need to get a number 'n' from the user and for all the numbers between 1 to 'n' code the program to print all the numbers divided by 3 without residue && print ONLY the numbers that both (or one) of their digits equal to 5 or less, for example if the user give 22 the programs prints 3,12,21.

thats what ive done by now :

public static void main(String[] args) {

Scanner get = new Scanner(System.in);

int num;

System.out.println("Enter A Random Number: ");

num = get.nextInt();

for (int i=1;i>0 &&...

By: StackOverFlow - Thursday, 8 November

# Related Posts

- New In Last 40 minutes
- Replace fixed number of symbols in String StackOverFlow (Today) - I have this number: 4200000000000000I would like to leave only the first 4 digits and last 3 digits:42000......000Everything else should be replaced by dots. How I can implement this with...
- Older News
- How to truncate the number of digits after the decimal StackOverFlow (Today) - Suppose, I take an irrational number, q, and an integer n, and I want to print the truncated value of q after keeping exactly n digits after the decimal. Example:...
- Which digits of a UUID are least likely to collide if the generator (e.g. Java version of UUID) is unknown? StackOverFlow (Yesterday) - Suppose we have an existing set of UUIDs (say, millions, though it doesn't matter) that may have been generated by different clients, so that we don't know the algorithm that...
- Is there something wrong with my indentation? StackOverFlow (2 days ago) - This may be off topic, but a teacher of mine recently said that my indentation was incorrect but gave a very vague reason of what was wrong and I do...
- Scratch Card - Decimal to Octal Conversion. StackOverFlow (3 days ago) - I need help in solving this:A scratch card consists of 4 sets of 5 digits (20 digits in total) e.g. [10006-12342-00081-99993] which are printed separated by a space or a...