jamesy961 jamesy961
  • 23-02-2017
  • Computers and Technology
contestada

I'm stuck on this problem and how do I test the program with the arguments.

Im stuck on this problem and how do I test the program with the arguments class=

Respuesta :

rsmith6559
rsmith6559 rsmith6559
  • 24-02-2017
The basic processing would be:

int factorial = 1;
while( N > 0 )
{
       factorial *= N;
       N--;
}

system.out.println( args[1] + "! is " + factorial );

It's kind of funny that the example run in your image has the wrong answer.
Answer Link

Otras preguntas

8 1/4 in simplest form
Sarabeth ran 1 2/5 miles on a path around the park. This was 5/8 of the distance around the park. What is the distance around the park.
what the decimal of 2 1/4
If luisa travel 5 miles west then 8 miles south then 2.5 miles west how far is she from where she started?
What shape have at least 2 parallel sides
Approximately, where do the numbers in the first file go in the second file's number line?If possible, post a number line like mine onto your answer and make ar
omega 3 fatty acids are important because they
find three acids and three bases used in your home. 1) what are theses acids and bases used for? 2)look up the chemical name and chemical formula of each acid a
If the unit selling price is 2.50 and the unit cost is 1.00, what action is needed to maintain the gross margin percentage when unit cost increases 0.25?
A problem play focuses on what exactly? Select all that apply. 1. problems in the author's life 2. problems in society 3. problems in life that haven't yet occ