float f(float x) {if (x <= 3) {return x x - 3 x + 9;} else {return 1 / (x * x + 6);}}
int main() {float x;std::cout << "Enter a value for x: ";std::cin >> x;
}
float f(float x) {
if (x <= 3) {
return x x - 3 x + 9;
} else {
return 1 / (x * x + 6);
}
}
int main() {
std::cout << "f(x) = " << f(x) << std::endl;float x;
std::cout << "Enter a value for x: ";
std::cin >> x;
return 0;
}