Given a number n, check whether it’s prime number or not using recursion.
Input : n = 11 Output : Yes Input : n = 15 Output : No
The idea is based on school method to check for prime numbers.
- Recursive sum of digits of a number is prime or not
- Recursive program to check if number is palindrome or not
- C Program to Check Whether a Number is Prime or not
- Python program to check whether a number is Prime or not
- Efficient program to print all prime factors of a given number
- C Program for efficiently print all prime factors of a given number
- Java Program for efficiently print all prime factors of a given number
- Print the nearest prime number formed by adding prime numbers to N
- Find coordinates of a prime number in a Prime Spiral
- Check if a prime number can be expressed as sum of two Prime Numbers
- Recursive program to print all subsets with given sum
- Recursive Program for Binary to Decimal
- Recursive program to generate power set
- Recursive program to print formula for GCD of n integers
- Program to reverse a string (Iterative and Recursive)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.