HRMlblCMFqqInfU78c3NMJxDetM02ycHTU9BqBl9

C Program to Check Odd Even Number

C Program to Check Odd Even Number

en.hobingoding.com - Hi coders. Today, we will explore how to create a C program to check odd even number. However, don't hesitate to ask any questions through the comment section below. So, let's see how the code works. Enjoy!

Test Case

Test #1
Input Number : 5
5 is an Odd Number.

Test #2
Input Number : 10
10 is an Even Number.

Source Code

#include <stdio.h>
// visit us hobingoding.com

int main(){
    int number;
    printf("Input Number : ");
    scanf("%d", &number);
    if(number%2==0)
        printf("%d is an Even Number.", number);
    else
        printf("%d is an Odd Number.", number);
    return 0;
}

Now that you've seen how the code works, I hope this tutorial has provided a clear understanding about this topic by using C. With this knowledge, you can explore more programming concepts and create other fascinating programs. Happy coding and keep on learning on your programming journey!

Feel free to share this knowledge with others. See you in the next post!

Related Posts
Newer Oldest
Fandi Presly Simamora
Lecturer, code lover, technology enthusiast, enjoys sharing various things through writing, and of course, just a regular human being. Hello world :)

Related Posts

Post a Comment