Question
I need to create a while loop with the code that has been provided. I need to create that sample output as well. Here are
I need to create a while loop with the code that has been provided. I need to create that sample output as well. Here are the codes...
Runner:
//(c) A+ Computer Science //www.apluscompsci.com //Name import static java.lang.System.*; public class FactorialRunner { public static void main ( String[] args ) { } }
Other Code:
//(c) A+ Computer Science //www.apluscompsci.com //Name import static java.lang.System.*; public class Factorial { private int number; public Factorial() { } public Factorial(int num) { } public void setNum(int num) { } public int getNum() { return 0; } public long getFactorial( ) { long factorial=1; return factorial; } public String toString() { return "factorial of " + getNum() + " is "+ getFactorial()+" "; } }
Sample Data : 5 4 8 15 6 9 3 Sample Output : factorial of 5 is 120 factorial of 4 is 24 factorial of 8 i3 40320 factorial of 15 is 1307674368000 factorial of 6 is 720 factorial of 9 is 362880 factorial of 3 is 6
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started