New course! Every coder should learn Generative AI!
Try a free lesson+ 1
What is the error in this code?
I want to create a java program that calculates whether a number is a lab number or not. A lab number is a number whose prime factor's square is also a factor of that number. Please help😖😖
4 Answers
0
Post your code. So we can tell what is less in your code.
Logic how you can start doing this problem.
1. Take number from user and get prime factors, store factors in array.
2. Then you get factors in array then square each element of your array.
3. Now compare user number to each element in array.
4. If you found number print lab number , if don't found then not.
0
Any number which is lab number ? Means example
0
A lab number is a number whose prime factor's square is also a factor of a number
Eg: 8,50