I am new to java and have this course work to complete can you assist me with the codes pleas
I need to write a program that helps me perform basic math tasks, working out factorials, powers and primes. Start by printing the menu
Welcome to the Math Calculator
Pick the problem you want help with.
a) factorial
b) powers
c) prime number
q) Quit
Enter your choice:
and read in their choice as a character.
If the user selects (a), I need to prompt the user for a number
Enter the factorial: this is the factorial you are to work out. You obtain the factorial value by multiplying every number between 1 and X together, e.g.
factorial of 4 is 1 * 2 * 3 * 4
when you should print the answer in the form:-
The factorial of X is XXXXX
if the user selects (b), you are to prompt the user for 2 numbers, the value and the power to raise it to.
Enter the value:
Enter the power:
So 2 to the power of three, or 2 cubed is
2 * 2 * 2
and then print the answer in the form a to the power of b is c
If the user enters c you are to prompt them to enter a number
Enter a number to prime check:
and then test to see if is a prime, prime numbers are those which are only divisible by 1 and themselves
e.g. 3, 5, 7, 11, 13
you are then to print
x is prime or x is not prime depending.
If the user enters q you are to quit the program using System.exit(0);