alisonmcgrew alisonmcgrew
  • 16-02-2017
  • Computers and Technology
contestada

how to write a java program that computes the value of 1.0/(n!)

Respuesta :

evilmonkey evilmonkey
  • 16-02-2017

Write a java program that computes the value of

+1.0/(1!) + 1.0/(2!) + 1.0/(3!) + ... + 1(n!)

Your program should prompt for and read from the keyboard the value of n. It must compute each term from the previous term. Also include the statement

System.out.println(" e = " + Math.E);

Use type double for your computations. Run your program for n = 1, 10, 20, 50 and 100.

Answer Link
almightypoptart almightypoptart
  • 16-02-2017
Not quite sure actually
Answer Link

Otras preguntas

If a ball is rolling at a velocity of 1.5 m/sec and has a momentum of 10.0 kg·m/sec, what is the mass of the  ball?
What are 5 fun facts about the cell membrane?
two decimal places for 28.4593
how do I solve (y+10)^2
Can 9, 40, 41 be the side lengths of a triangle? If so, is it acute, obtuse, or right?
Martin pretended to be asleep whenever she came into the room. (A) whenever she came (B) at the time she comes (C) although she came (D) since she came (E) by
the coordinate of A is -3, and the coordinate of B is 0.5  Find AB ..please explain answer
how does rock cycle impact the lithosphere?? plzzz HELP.!!!
3/4(n+3)=9 how do I find n
Is it possible for a number to be a rational number that is not an integer but is a whole number? PLEASE EXPLAIN