⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtbh2.java

📁 java 编程的一些简单例子
💻 JAVA
字号:
import java.io.*;

public class gtbh
{
	public static void main(String args[])
	{
		int i,j,h=0,c1,c2;
		String s;

		try{
			System.out.print("please input a int shu:");
			BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
			s=br.readLine();
			h=Integer.parseInt(s);
		}catch(IOException e){}
	       
	       c1=h/2;
		   c2=h/2;
La: Issushu(c1,f1);
	Issushu(c2,f2);
	if(f1&&f2)
	{
		System.out.println(h+"="+c1+"+"+c2);
		goto exit;
	}
	if(!(f1&&f2))
	{
		c1--;
		c2++;	
	   goto La;	   	   
	}
exit: ;
    }
	


void Issushu(int n,boolean f)
{
      f=true;
      for(int i=2;i<n;i++)
	  {
	    if(n%i==0)
		{
		  f=false;
		  break;
		}
	  }
}
	
}
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -