port java.util.Scanner;
public class FactorialTest {
public static void main(String[] args)
{ while(true){
System.out.println("请输入数字:");
Scanner sc=new Scanner(System.in);
Double t=sc.nextDouble();
int sum=1;
int i=1;
for(i=1;i<=t;i++)
{
sum*=i;
System.out.println("for"+sum);
}
sum=1; i=1;{
do{
sum*=i;i++;
}while(i<=t);
System.out.println("do while "+sum);
}
sum=1; i=1;{
while(i<=t){
sum*=i;i++;
}
System.out.println("while"+sum);}
}}}