fork(3) download
  1. //by Jaider Xavier Jr.
  2. class Ideone
  3. {
  4. public static void main (String[] args) throws java.lang.Exception
  5. {
  6. int fat=1;
  7. String mult="";
  8. for (int i=5; i>1; i--){
  9. fat *=i;
  10. mult +=i+" x ";
  11. }
  12. System.out.print(mult+"1 = "+fat);
  13. }
  14. }
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
5 x 4 x 3 x 2 x 1 = 120