SHARE
TWEET

Factorial

a guest Feb 17th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import java.util.Scanner;
  3.  
  4. public class factorial {
  5.  
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.  
  9.          int factorial;
  10.          int N;
  11.          
  12.          
  13.         Scanner kbInput = new Scanner (System.in);
  14.        
  15.         System.out.println("Enter N: ");
  16.         factorial = kbInput.nextInt();
  17.         System.out.println("Factorial: " + factorial);
  18.         factorial = kbInput.nextInt();
  19.         System.out.println("Do you want to continue? (y/n): ");
  20.         factorial = kbInput.nextInt();
  21.        
  22.        
  23.                
  24.     }
  25.  
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top