Skip to content
View haider747's full-sized avatar

Block or report haider747

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
haider747/README.md

#include

unsigned long long factorial(int n) { if (n <= 1) { return 1; } return n * factorial(n - 1); }

int main() { int num; std::cout << "Enter a number: "; std::cin >> num;

if (num < 0) {
    std::cout << "Factorial is not defined for negative numbers." << std::endl;
} else {
    unsigned long long result = factorial(num);
    std::cout << "Factorial of " << num << " is " << result << std::endl;
}

return 0;

}

Pinned Loading

  1. haider747 Public

    Config files for my GitHub profile.

    1