We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Security
  3. Terminology and Concepts
  4. Security Encryption Scheme
  5. Discussions

Security Encryption Scheme

Problem
Submissions
Leaderboard
Discussions

    You are viewing a single comment's thread. Return to all comments →

  • tpgreene
    5 years ago+ 0 comments
    #include<iostream>
    
    int factorial(int n){
        if(n==1){return n;}
        return factorial(n-1)*n;
    }
    
    int main(){
        int n;
        std::cin>>n;
        std::cout<<factorial(n);
        return 0;
    }
    
    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy