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

How many sixths are in 3 and 1 third ??
The Declaration of Independence states that if government does not protect citizens' rights, citizens have the authority to
Are there any poisonous animals in Washington State?
particles of minerals and other rocks that make up a rock are called______
What is the formula of volume ofba rhombic prism
one milliliter equals 10^3 liter. simplify 10^3
joseph had a quarter of a cookie. ellen had a half of a different cookie. The peice joseph had was larger. how could ellens peice be smaller? explain.
Max is making a rectangular garden that is 5 feet less than twice it's width. If the perimeter of the garden is 89 feet, what will be it's dimensions?
evaluate 8-11 to the square root of 25/121
When a bicycle rider puts on the brakes of a bicycle, friction cause some of the mechanical energy to change into what type of energy?