/* ternary if-else */ #include int main() { int x, y; printf("Enter a number\n"); scanf("%d", &x); y = (x > 5 ? 3 : 4); printf("Result is %d\n", y); }