Saturday, 19 February 2011

Factorial program in java


Java code to find out the factorial of give number





import java.io.*;


class Test {

     public static void main(String[] args) throws IOException {

          int i=1,f=1,num;

          System.out.println("Enter the number:");

          BufferedReader br=new BufferedReader(new InputStreamReader (System.in));

          num=Integer.parseInt(br.readLine());

         

          while(i<

No comments:

Post a Comment