Computer Science, asked by jkhan0217, 1 month ago

c). To print the sum of the factorial of first n terms, where 'n' is he input by the user. For example: if
n =5, then sum=1! +2+3+41+5! = 1+2+6+24+120= 153.
A number is said to be NEON, if sum of all the digits of the square of the number is equal to the
number itself. For example: 92 = 81, sum of the digits = 1+8 = 9.
Write a main method to display the menu to display the menu and to create object of the class to
call the two methods that display output as per choices displayed in the menu.
For an incorrect menu choice an appropriate error message should be displayed.​

Answers

Answered by gyaneshwarsingh882
2

Answer:

To print the sum of the factorial of first n terms, where 'n' is he input by the user. For example: if

n =5, then sum=1! +2+3+41+5! = 1+2+6+24+120= 153.

A number is said to be NEON, if sum of all the digits of the square of the number is equal to the

number itself. For example: 92 = 81, sum of the digits = 1+8 = 9.

Write a main method to display the menu to display the menu and to create object of the class to

call the two methods that display output as per choices displayed in the menu.

For an incorrect menu choice an appropriate error message should be displayed.​

Explanation:

Here, we are implementing a java program that will read the value of N and find sum of the factorials from 1 to N. It is a solution of series 1! + 2! + 3! + 4! + ... N! in java.

Submitted by Chandra Shekhar, on January 06, 2018

Given N and we have find the solution of series 1! + 2! + 3! + 4! + ... N! using Java program. (Sum of the factorials from 1 to N).

Example:

   Input: 3

   Output: 9

   Explanation:

   1! + 2! + 3! = 1 + 2 + 6 = 9

   Input: 5

   Output: 152

   Explanation:

   1! + 2! + 3! + 4! + 5!

   = 1+2+6+24+120

   = 153

Answered by amriteshpan1230
2

Explanation:

Just print Sum at the end...actually cropping is not properly supported by this app (Not disrespectful but inadvertent)...nevertheless you know your answer now

Thank you

Mark as brainliest

Attachments:
Similar questions