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