Sum of squares of prime numbers in the interval
C++
Medium
loops
Task «Sum of squares of prime numbers in the interval»
Given two integers A and B (1 ≤ A ≤ B ≤ 10000). Find the sum of squares of all prime numbers in the interval [A, B]. A prime number is a natural number greater than 1 that is divisible only by 1 and itself. If there are no prime numbers in the interval, output 0. Use nested loops.
Input Format
Two integers A and B, separated by a space.
Output Format
An integer is the sum of squares of prime numbers in the interval [A, B].
main.cpp