any integer is input through the keyboard. Write a program to find out whether it is an odd number or even number. - Code With Friends

Breaking

Home Top Ad

Search Your Questions

Thursday, February 21, 2019

any integer is input through the keyboard. Write a program to find out whether it is an odd number or even number.

#include<stdio.h>
int main()
{
    int num,tr;
    printf("Enter your number ");
    scanf("%d",&num);

    if(num%2==0)
    {
        printf("This is even number\n \n ");
    }
    else
    {
        printf("This is odd number \n \n");
    }
}




No comments:

Post a Comment