package oo;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
int choose;
System.out.println("请输入选项:<1>素数判断 <2>阶乘计算 <0> 退出");
Scanner sc =new Scanner(System.in);
choose = sc.nextInt();
sc.close();
do{
switch(choose){
case 1:
sushu();
break;
case 2:
jiecheng();
break;}
}while(choose !=0 );}
public static int sushu(){
int i ,m;
double k;
Scanner sc =new Scanner(System.in);
System.out.println("请输入一个数:");
i= sc.nextInt();
sc.close();
k=Math.sqrt(i);
for (m = 2; m<k; m++)
if (i%m==0)break;
if(m>k)
System.out.println("yes");
else
System.out.println("no");
return i;}
public static int jiecheng(){
int a,b;
System.out.println("请输入一个数:");
Scanner sc =new Scanner(System.in);
a= sc.nextInt();
sc.close();
b=1;
while (a>0) {
b=a*b;a--;
}
System.out.println(b);
return a;}
}