Horje
EVEN AND ODD WITH CONDITIONAL OPERATOR Code Example
EVEN AND ODD WITH CONDITIONAL OPERATOR
/**
 * C program to check even or odd number using conditional operator
 */

#include <stdio.h>

int main()
{
    int num;

    /* Input a number from user */
    printf("Enter any number to check even or odd: ");
    scanf("%d", &num);

    /* 
     * If n%2==0 then 
     *     print it is even
     * else
     *     print it is odd
     */
    (num%2 == 0) 
        ? printf("The number is EVEN") 
        : printf("The number is ODD");

    return 0;
}




Whatever

Related
Flutter how to add button splash affect to Column Code Example Flutter how to add button splash affect to Column Code Example
l&t finance customer care number indore Code Example l&t finance customer care number indore Code Example
Mehedeun Hasan Code Example Mehedeun Hasan Code Example
xóa log docker Code Example xóa log docker Code Example
guard-rspec Code Example guard-rspec Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7