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

Need help plzz A microscope that enlarges an object 400 times is said to have a _____ of 400. I think its magnification. (A)sharpness (B)magnification (C)resolu
PLZZZZ HELP PLZ PLZ PLZ! What is the approximate circumference of a pie pan with a diameter of 15.3 inches? (Use π = 3.14) How do you solve this equation? I do
What property would be used to solve 6x=72
what snack is the mode? ​
the end result of an analysis is a)an opinion about the meaning of the text b)a clear knowledge of what the author tried to say c)an idea fro how to write a gr
Answer the following.
The answers to the paper.
[tex] \sqrt{25} [/tex]​
Company A offers a semimonthly salary of $2432, and Company B offers a biweekly salary of $2390. Which company pays a greater annual salary? Will give BRAINLIES
why this invention is created interchangeable parts