Coding Challenge#1 Solution.


Here,goes the solution--






Explanation of code--


  1. First we import Scanner class to accept input
  2. Create an object s.
  3. The we ask for a Number to be Entered.
  4. Initialize variables n and factorial
  5. Loop the factorial n times,multiplying consecutive integers to it n times to get its factorial.
  6. Finally,we can print the result.


Output--

1)Open command prompt and navigate to folder with your file.





2)Compile Your Project.




3)Then Run.




4)Put a Number and get output.





                                      Thank You for Visiting Our Blog.

                                                    Please Share !

    The Solution of Coding Challenge#2 coming this Saturday.

0 Comments