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 →

  • gadilingappa1
    3 months ago+ 0 comments

    include

    include

    include

    include

    int main() { int a, b; scanf("%d\n%d", &a, &b); // Complete the code. int num; while(num!=0) { switch(num%10) { case 0:printf("zero"); break; case 1:printf("one"); break; case 2:printf("two"); break; case 3:printf("three"); break; case 4:printf("four"); break; case 5:printf("five"); break; case 6:printf("six"); break; case 7:printf("seven"); break; case 8:printf("eight"); break; case 9:printf("neon"); break; default:printf("not a valid"); } num/=10; } if (a%2==0)||(b%2==0) { printf("odd"); } else { { printf("even"); } }

    return 0;
    

    }

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