A simple program that I wrote using C that ask the user to give a number and then the program will check if the given number is an odd or even number using C language in Linux operating system.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Program Listing

 /* odd_even.c
   Author : Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.com  and www.jakerpomperada.blogspot.com
   jakerpomperada@gmail.com
   Bacolod City, Negros Occidenal Philippines.
   */

#include <stdio.h>

int main(){
	
    int a=0;

    printf("\n\n");
    printf("\tOdd and Even Numbers in C using Linux");
    printf("\n\n");
    printf("\tEnter a Number : ");
    scanf("%d",&a);
    /*  true if variable a is perfectly divisible by 2 */
    printf("\n");
    if(a % 2 == 0)
        printf("\tThe given number %d is even.", a);
    else
        printf("\tThe given number %d is odd.", a);
    printf("\n\n");
    printf("\tEnd of Program");
    printf("\n\n");
}


Leave a Reply

Your email address will not be published.