Skip to content

Added scanner in the factorial program to make finding factorial easy #1304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 8, 2020

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