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

What new information can you add to your definition of chemical change?
What was an effect of the discovery of the New World in the late fifteenth century?
The kings CONNIVING brother had his eyes on getting the throne another word for CONNIVING is impolite sneaky mischievous
The policy of ___________ was to prevent the expansion of communism.
how do you convert kilograms to pounds
why were greeks forced to trade for good they needed
solve this inequality j/4 - 8 < 4
According to Renaissance philosophy, commoners often represent A. appetite. B. love. C. pride. D. reason.
Segregation by law is referred to as ___________ segregation.
The __________, whose name is an Arabic word meaning "shore" or "edge," borders the Sahara Desert.