← All problemsSign in

Charlie and Prime Numbers

Charlie has a fascination for Prime Numbers. But he never went to school so he always makes a mistake when he is asked to tell whether a number is a Prime Number or not. So, he asks his brother Alan to help him out with this. Your job is to help Alan in writing a program which prints THE SUM of all prime numbers between M and N (inclusive). Input The first Line of Input will contain an Integer T

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start