Finished
This commit is contained in:
parent
a63fe93d88
commit
d79f0ca19d
1 changed files with 9 additions and 4 deletions
|
@ -7,11 +7,16 @@ public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
Scanner scan = new Scanner(System.in);
|
Scanner scan = new Scanner(System.in);
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
System.out.println("Input an integer to be factored:");
|
|
||||||
System.out.println("Note: Must be positive. If negative, remove negative and make one factor negative");
|
|
||||||
double a = scan.nextDouble();
|
|
||||||
System.out.println(factor(a));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String factor(double a){
|
public static String factor(double a){
|
||||||
|
|
Loading…
Reference in a new issue