素数问题、急
函数fun的功能是:将一个大偶数a(a >= 6)分解成两个素数之和的形式。例如:若输入数值10,则输出10 = 3 + 7 和 10 = 5 + 3.#include <stdio.h>
#include "math.h"
void fun(int a)
{
int k, m1, m2;
for (m1 = 3; m1 <= a / 2; m1 += 2)
{
for (k = 2; k <= sqrt(m1); k++) if (m1 % k == 0) break;
if (k > sqrt(m1)) m2 = __________;
else break;
for (k = 2; k <= sqrt(m2); k++) if (m2 % k == 0) ___________;
if (k > sqrt(m2)) printf("%d = %d + %d\n",a,m1,_______);
}
}
int main(void)
{
int a;
printf("\nEnter a:");
scanf("%d",&a);
fun(a);
return 0;
}