switch (no%2) {
case 0:puts("偶数");break;
case 1:puts("奇数");break;
}

↓

puts((no%2)?"奇数":"偶数");