filmov
tv
Menu driven program in java.

Показать описание
QUESTION : Create a menu driven program. Based on user choice perform the operation:
Find Factorial of a number
Check whether number is prime or not
Print Fibonacci Series
Factorial : In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n:
FORMULA :
n ! = n⋅(n−1)⋅(n−2)⋅(n−3)⋅⋯⋅3⋅2⋅1.
For example,
5 ! = 5⋅4⋅3⋅2⋅1=120.
Prime number : It is a number that is divisible by the number itself and 1 .
e.g. (2,3,5,7,etc.)
Fibonacci series : In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1.
The beginning of the sequence is thus:
0 , 1 , 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55 , 89 ,144 , …
Thank you for watching .
CODING SHODING.
Attribution :
Find Factorial of a number
Check whether number is prime or not
Print Fibonacci Series
Factorial : In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n:
FORMULA :
n ! = n⋅(n−1)⋅(n−2)⋅(n−3)⋅⋯⋅3⋅2⋅1.
For example,
5 ! = 5⋅4⋅3⋅2⋅1=120.
Prime number : It is a number that is divisible by the number itself and 1 .
e.g. (2,3,5,7,etc.)
Fibonacci series : In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1.
The beginning of the sequence is thus:
0 , 1 , 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55 , 89 ,144 , …
Thank you for watching .
CODING SHODING.
Attribution :