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.
_Booliseven(intvalue){returnvalue%2==0;}intmain(){inta,b;scanf("%d\n%d",&a,&b);// Complete the code.for(inti=a;i<=b;i++){if(i<=9){if(i==1)printf("one\n");if(i==2)printf("two\n");if(i==3)printf("three\n");if(i==4)printf("four\n");if(i==5)printf("five\n");if(i==6)printf("six\n");if(i==7)printf("seven\n");if(i==8)printf("eight\n");if(i==9)printf("nine\n");}elseif(iseven(i)){printf("even\n");}else{printf("odd\n");}}return0;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
For Loop in C
You are viewing a single comment's thread. Return to all comments →