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
  • Hiring developers?
  1. Prepare
  2. C++
  3. Introduction
  4. Conditional Statements
  5. Discussions

Conditional Statements

Problem
Submissions
Leaderboard
Discussions
Editorial

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

  • rushibho03
    2 months ago+ 0 comments

    include

    using namespace std;

    int main()

    { int a; cin>>a;

    { if(a==1) { cout<<"one"; } else if(a==2) { cout<<"two"; } else if(a==3) { cout<<"three";

    } else if(a==4) { cout<<"four"; } else if(a==5) { cout<<"five";

    } else if(a==6) { cout<<"six"; } else if(a==7) { cout<<"seven"; } else if(a==8) { cout<<"eight";

    } else if(a==9) { cout<<"nine"; }

    else { cout<<"Greater than 9"; } return 0; } }

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy