Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. public static void factor(){
  2.  
  3. int n=0;
  4. int factorial = 1;
  5. while (n<=0&n<=30)
  6. {
  7. n=n++;
  8. factorial = factorial * n;
  9. n--;
  10. System.out.println("Factorial = " + factorial);
  11. }
  12.  
  13.  
  14. }
  15.  
  16.  
  17. public static void main(String[] args) {
  18. factor();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement