daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Sep 24th, 2014 374 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class whileFactorial {
  2.         public static void main(String[] args){
  3.                 int n = 5;
  4.                 int x = 1;
  5.                 int y = 1;
  6.                
  7.                 while (y <= n){
  8.                         x = x * y;
  9.                         y = y + 1;
  10.                         System.out.println(x);
  11.                
  12.                 }
  13.                 }
  14. }
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