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. C
  3. Conditionals and Loops
  4. For Loop in C
  5. Discussions

For Loop in C

Problem
Submissions
Leaderboard
Discussions
Editorial

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

  • tejabotcha525
    3 months ago+ 0 comments

    include

    include

    include

    include

    int main() { int a, b,i=0,j=0; scanf("%d\n%d", &a, &b); // Complete the code. for(i=0,j=0;i<=a,j<=b,i++,j++) { if(i==a) printf("one"); if(i==a) printf("two"); if(i==a) printf("three"); if(i==a) printf("four"); if(i==a) printf("five"); if(i==a) printf("six"); if(i==a) printf("seven"); if(i==a) printf("eight"); if(i==a) printf("nine"); if(i==b) printf("one"); if(i==b) printf("two"); if(i==b) printf("three"); if(i==b) printf("four"); if(i==b) printf("five"); if(i==b) printf("six"); if(i==b) printf("seven"); if(i==b) printf("eight"); if(i==b) printf("nine"); else { printf("nine"); } else if(a>9) printf("even"); else if(b>9) return 0; }

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