int f(int x) { int y; switch((x>1)+(x>10)) { case 0: y = x; break; case 1: y = 2 * x - 1; break; case 2: y = 3 * x - 11; break; default: break; } return y; }