public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n= sc.nextInt();
method(n);
}
private static void method(int n) {
for (int i = 2; i <=n ; i++) {
for (int j = 2; j <=n/2 ; j++) {
if (zhishi(i)+zhishi(j)==n&&zhishi(i)!=0&zhishi(j)!=0){
System.out.print(n+"="+i+"+"+j+"\t");
}}}}
private static int zhishi(int i){
int count=0;
int j;
for (j = 1; j <=i; j++) {
if (i%j==0){count++;}}
if (count==2){
return i;
}return 0;
}
07-11
2365
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-26