Answer to Question #241935 in Java | JSP | JSF for doeboy

Question #241935
create a program count that prints out different combinations of 5 using numbers 1 to 35
1
Expert's answer
2021-09-26T21:02:48-0400
public class Main {
    public static void main(String[] args) {
        for (int a = 1; a < 36; a++) {
            for (int b = 1; b < 36; b++) {
                for (int c = 1; c < 36; c++) {
                    for (int d = 1; d < 36; d++) {
                        for (int e = 1; e < 36; e++) {
                            System.out.println(a + " " + b + " " + c + " " + d + " " + e);
                        }
                    }
                }
            }
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS