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

.Who were the Pratiharas? Describe how and where they came to power and how their kingdom ended?
help me plissssss. “
3³+3²=??? whats the answer​
Leo has a rectangular garden with a perimeter of 40 feet. The width of the garden is 8 feet. What is the length of the garden?​
If you had 2 angles that equal 180 degrees and you was given a angle of 55 degrees What degree is the missing angle? *
Both individuals and organizations can be consumers. O True O False
Does anybody know all the parts?
A wave along a guitar string has a frequency of 450 Hz and a wavelength of 3.5 meters. Calculate the speed of the wave. Show the formula and show your calculat
Please help find the SURFACE AREA . Be geniune no links will mark Es brainlieèst
Ally ate 240 grapes in 6 days. Which rate below is equivalent to Ally's rate? A. 60 grapes in 2 days B. 60 grapes in 3 days C. 120 grapes in 2 days D. 120 grap