Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class facturiel {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n = scan.nextInt();
- int fact = 1;
- do {
- fact = fact * n;
- n--;
- } while(n > 1);
- System.out.println(fact);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement