Monday, 6 January 2020

HAY THANK FOR VISIT



<<<<<<<LET's START WITH ANOTHER QUESTION>>>>>>>>


QUESTION---WRITE A PROGRAM TO PRINT THE FACTORIAL OF A NUMBER..



class Factorial
{
    void main(int n)
    {
        int m=1;
        for(int i=1;i<=n;i++)
        {
            m=m*i;
        }
        System.out.println("factorial of the number is "+m);
    }
}







INPUT--------5
OUTPUT-------------




No comments:

Post a Comment

HAY THAKYOU FOE VISIT

Program(python):-Find duplicates in an array (Geeks for geek problem)

QUESTION:- Given an array  a  of size  N  which contains elements from  0  to  N-1 , you need to find all the elements occurring more than o...