Horje
odd even in c with ternary operator Code Example
odd even in c with ternary operator
#include <stdio.h>
int main() {
    int num;
    printf("Enter an integer: ");
    scanf("%d", &num);
    // true if num is perfectly divisible by 2
   num % 2 == 0 ? printf("%d is even.", num); :  printf("%d is odd.", num);
    return 0;
}




C

Related
Bitwise Operators in C language Code Example Bitwise Operators in C language Code Example
c convert string to size_t Code Example c convert string to size_t Code Example
why do we need return 0 in c? Code Example why do we need return 0 in c? Code Example
Input size and elements Code Example Input size and elements Code Example
chevront de vlavier Code Example chevront de vlavier Code Example

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