five

From , 5 Years ago, written in Java, viewed 235 times.
URL https://pastebin.vip/view/77f959f1
  1. import java.util.Scanner;
  2. public class Test1 {
  3.     public static void main(String[] args) {
  4.         Scanner input=new Scanner(System.in);//外部输入
  5.         System.out.println("请输入要求的阶乘数:");
  6.         int j=input.nextInt();//接受输入的值,并赋给j
  7.         int result=1;
  8.         /*阶乘的求法
  9.           */
  10.         for(int i=1;i<=j;i++){
  11.             result =i*result;
  12.         }System.out.print(result);
  13.     }
  14.     }
  15.  

Reply to "five"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website