Enter an integer greater than 3 n (n 1000), output (including 3 and n) between 3 to n primes the sum of the squares of the, such as: 9 input and output of 83? This code should how to write? Tried several times with the for statement is correct, consult bosses
CodePudding user response:
The code to see where is it
CodePudding user response:
Write a function to judge whether a prime number
int judge_prime (int num) { For ()//2 to num 1 { Can be divided exactly by If (to) break; return 0; } return 1; }
Int judge=judge_prime (num) If (judge==) Sum=sum + num * num; So, probably in the loop