Saturday Questions ---- 16-April-2022

Saturday Questions

Questions on Prime Numbers

Varanasi Software Junction: Saturday Questions.


  1. Write a program to check if a number is prime. 
  2. Write a program to find all prime numbers in a range.
  3. Find the largest prime factor of a number.
  4. Find the sum of all prime factors of a number.
  5. Find the lowest prime factor of a number.
  6. Check whether a number has at least 3 distinct prime factors.
  7. Check if a number is a twisted prime. Eg 79 and 97.
  8. Find the kth prime factor of  number.
  9. Check if a number is a prime number and a Fibonacci number.
  10. Find a number with exactly n prime factors.

Post your answers in the discussion boxes below.

Contact us for software training, education or development










 

Post a Comment

Me
Me
WhatsApp Contact Me on WhatsApp
×

📩 Today’s Programming Tip

✅ Flutter/Dart Tip: Use ListView.builder for efficient large lists.
Example:
ListView.builder(
  itemCount: items.length,
  itemBuilder: (context, index) {
    return Text(items[index]);
  },
);

🔗 Learn More

💡 Tip of the Day