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

Iron is a solid, grey metal. Oxygen is a colorless gas. When iron and oxygen chemically combine , rust is made. Rust has a reddish brown color. Why does rust di
which two numbers multiply to give you 100 and add to give you 10
the interaction between mosquitoes and human beings is called ?
125 thousandths = 1 tenth _______________ thousandths
What is the gel like substance in a plant and animal cell?
What two mixed numbers have a sum of 3
What were the main policies and changes set forth by the Congress of Vienna (1814-15)?
how do you write a good essay?
How would you find the zeros of the function by rewriting the function in intercept form? Ex: y=x^2-12x+32
Why is there no ocean-continent divergence? I need to know I'm just in 6th grade