#include <stdio.h>Conditional operator lang po ito ts, magbasa kalang kahit konti lang magegets mo yan.
input % 2 == 0
printf("Even");
else
printf("Odd");
Tama ba ito ts#include <stdio.h>
int main() {
int num;
printf("Enter an number: ");
scanf("%d", &num);
(num % 2 == 0) ? printf("%d is even.", num) : printf("%d is odd.", num);
return 0;
}
Ta
Tama ba ito ts
if(num % 2 == 0)
printf("Even");
else
printf ("Odd");