Program to check a given number is even or odd.

 #include <stdio.h>


int main()

{

    int num1;

    printf("enter the value of num1 ");

    scanf("%d",&num1);

    if(num1%2==0){

    printf("the number is even %d",num1);

    }else 

    {

        printf("the number is odd %d",num1);

    }


    return 0;

}


No comments:

Post a Comment

Programming in C Language

  PROGRAM LIST TO BECOME PRO IN C    😍😍😍            PRACTICE SETS                                                        UNIT -1  👇   IN...