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

Write your answer as a fraction in simplest form subtract 5/8-3/5
How were Serbia''s actions in Kosovo similar to its actions in Bosnia and Herzegovina ?
x=square root of 880-8x
what is .54 repeating as a fraction
Why do some investigations require a control?
Round 0.142 to the nearest tenth
what is .8 repeating as a fraction
Find the coordinates of the midpoint of a segment having the given end pointsC. C(9,5),D(17,4) I can't figure it out.
what type of equation is y= -3/4x -5/4?
what was william harveys middle name