This commit is contained in:
blzimme000 2022-01-07 14:10:31 -06:00
parent a63fe93d88
commit d79f0ca19d

View file

@ -7,13 +7,18 @@ public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Input an integer to be factored:");
while (true){
System.out.println("Input an positive integer to be factored. Enter \"3.14\" to exit");
System.out.println("Note: Must be positive. If negative, remove negative and make one factor negative");
double a = scan.nextDouble();
if (a == 3.14){
break;
}
System.out.println(factor(a));
}
}
public static String factor(double a){
String thingtoreturn = "";
for (int i = 1; i < (.5*a); i++) {