Skip to content

Conversation

Vikrant-Khedkar
Copy link
Contributor

I have added scanner in the factorial program to make finding factorial easy

Copy link
Member

@StepfenShawn StepfenShawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add indentation in the "main" function statement block to make the code look more beautiful:)

@Vikrant-Khedkar
Copy link
Contributor Author

Please add indentation in the "main" function statement block to make the code look more beautiful:)

I am new here please explain what do you mean by that

Copy link
Member

@StepfenShawn StepfenShawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 public static void main(String[] args) { 
        int n = 1;
        Scanner sc= new Scanner(System.in);
        System.out.println("Enter Number");
        n=sc.nextInt();
        System.out.println(n + "! = " + factorial(n));
}

@Vikrant-Khedkar
Copy link
Contributor Author

 public static void main(String[] args) { 
        int n = 1;
        Scanner sc= new Scanner(System.in);
        System.out.println("Enter Number");
        n=sc.nextInt();
        System.out.println(n + "! = " + factorial(n));
}

Ok understood I will make changes

Copy link
Member

@StepfenShawn StepfenShawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@StepfenShawn StepfenShawn merged commit 63b2ec9 into TheAlgorithms:master May 8, 2020
@Vikrant-Khedkar
Copy link
Contributor Author

Thanks

Thanks it was my first time 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants