Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What am I doing wrong with the perfect code? I finished the code, and compile, but I can not get the factoring answer that from

What am I doing wrong with the perfect code?

I finished the code, and compile, but I can not get the factoring answer that from the code as the example.

The question is is how to fix it or is I need to add more into the code to reach the answer.

This is my code import java.util.Scanner; public class Perfect { public static void main (String args[]) { Scanner i = new Scanner(System.in); int numbers; int perfect; do { System.out.print("How many numbers would you like to test?"); numbers=i.nextInt(); } while (numbers <1); for (int count = 0; count0; y--) { total = x%y; if (total ==0) System.out.printf(" %d ",y); } } }

This is is the output of my code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

Discuss the concept of network security.

Answered: 1 week ago

Question

6. How do you expect to use active listening during the meeting?

Answered: 1 week ago