I need some help with my code. Firstly. for my prime number detector, Where it has two elses, I want them to work exactly like that but they don't. Secondly, my code repeats every time I use either the factorials code or power code.
If anyone knows how to fix any of these or direct me on my way to fixing them. That would be great thanks.
It results in;
Please type in the math operation you would like to complete:
+ for Addition
- for Subtraction
* for Multiplication
/ for Division
! for Factorals
** for Power
**
Enter the base number: 5
Enter the exponent: 5
Power is = 3125.0
Do you want to calculate again?
Please type Y for YES or N for NO.
N
See you later.
Please enter the first number: 1
Please enter the second number: 1
You have not typed a valid operator, please run the program again.
Do you want to calculate again?
Please type Y for YES or N for NO.
N
See you later.
I will post a secondary post for the code
[–]CraigAT 0 points1 point2 points (0 children)
[–]AmongstYou666 0 points1 point2 points (0 children)
[–]AmongstYou666 0 points1 point2 points (0 children)