Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. package faktorialapp;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class MainApp {
  6.  
  7. public static void main(String[] args) {
  8. int x;
  9.  
  10. Scanner scan = new Scanner(System.in);
  11.  
  12. System.out.print("Masukkan nilai : ");
  13. x = scan.nextInt();
  14.  
  15. Faktorial f = new Faktorial(x);
  16.  
  17. System.out.println("Hasil dari " + x + "! = " + f.faktorial());
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement