/* Laboratory Assignment For Thursday of Week of 4/10/04 2) Write a loop based method which prints the first n terms of the following series S(n) = n!/(2^n) The input parameter should be int "n". The output type will be void. */ class SeriesNew { public void generate(int n) { System.out.println("THE SERIES IS:: " ); int i,fn=1; double gn; if(n<0) { System.out.println("\n Invalid value for n: n should be a natural number \n"); return; } for(i=0;i