Skip to content

[Proposal] Factorial #224

@rnkraj05

Description

@rnkraj05

Request Issue

No response

Website Section

No response

Proposal Details

import java.util.Scanner;

class Factorial{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the number: ");
int n = sc.nextInt();
int fact = 1;
for(int i=1; i<=n; i++){
fact *= i;
}
System.out.println(fact);
sc.close();
}
}

Author References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions