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

I need help on math true and false please
Plsssssssss HELP!!!!!!!!!
Help me plzzzzz Speaking in 2 min Describe something you can do to help protect the environment
Rory has felt depressed most of the last three years. He also suffers from poor appetite and low self-esteem. Rory most likely has:
In two or three sentences, summarize what the essay suggests could help women succeed in business. How does the summary help you identify Sandberg's message, au
What is the slope of the line?
Estimate the product. Round each factor to the nearest whole number, and then multiply. 0.9 × 1.084
The cat is crawling silently ......... the bed 1.with 2.of 3.at 4.towards​
Tryouts Kayla tried to ignore her sore throat and stuffy nose. She was trying out for the soccer team, and Coach Markham would pick only the twenty best players
how do I know which substance is being reduced? ​