C++
#include <cmath>
#include <iostream>
int main()
{
float x;
std::cin >> x;
std::cout << "F(x) = ";
if(x <= 3)
std::cout << pow(-x, 2) + 3*x + 9 << std::endl;
else if(x > 3)
std::cout << x/pow(x, 2) + 1 << std::endl;
return 0;
}
C++
#include <cmath>
#include <iostream>
int main()
{
float x;
std::cin >> x;
std::cout << "F(x) = ";
if(x <= 3)
std::cout << pow(-x, 2) + 3*x + 9 << std::endl;
else if(x > 3)
std::cout << x/pow(x, 2) + 1 << std::endl;
return 0;
}