Hi all. I need to write a program that creates and displays unique three-digit numbers using 1, 2, 3, 4. It also needs to count how many three-digit numbers there are (in this case 24), however I also want to add each indivual index to these 24 numbers. I tried keeping the indexes seperately however that only messed things up.
Thank you for your help.
Don't call a class to create numbers Apples.
Please explain what you mean about numbering three‑digit integers. You already have an amount variable. Are you going to use that? I think you will find there are 4! = 24 such combinations of your three digits if they are all different. What is going wrong with your program? I got it to run successfully on JShell.
My, my, aren't you a big fella. Here, have a tiny ad: