Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package matriz;
- import java.util.Scanner;
- public class xd {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int num;
- int fat = 1;
- System.out.println("numero");
- num = sc.nextInt();
- for(int i = num; i>0;i--){
- System.out.println(i);
- fat *=i;
- if(num == 0){
- fat = 1;
- }
- }
- System.out.println(fat);
- }
- /* César N. */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement