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

Similies in THE book mrs. Frisby and the rats of nimh
~PLEASE HELP~ *Dealing with ratios*
Which sentence does not contain any errors in comma usage? A. That team, coached by my dad won third place in the tournament. B. People, eating at restaurants,
What is the main reason almost all large companies are corporations? Corporations are untaxed by state and federal governments, so all profits go to the investo
The quote below is from Lyndon Johnson in 1964. “Poverty must not be a bar to learning, and learning must offer an escape from poverty.” What other element did
can two different size rectangles have the same area? could someone please explain
name a subject that symmetry is important in other than math explain
How many total atoms are found in one molecule of H2O? A. 1 B. 2 C. 4 D. 3 Help i think its B
Infer how climate data can be used by farmers.
what is the slope of the line 4x-8y-16=0 in simplest form?