Number even or odd?
Write a program to print whether a given number is even or odd?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mukesh Kumar TiwariRank #1,774 · 844 reputationPosted Nov 10, 2013, 10:41 PM EST
printf("Enter an integer\n");
scanf("%d",&n);
if ( n%2 == 0 ) printf("Even\n");
else printf("Odd\n");
VulpesRank #55 · 29.2K reputationPosted Nov 11, 2013, 12:09 AM EST
Abhay ShankerRank #375 · 6.7K reputationPosted Nov 11, 2013, 1:33 AM EST