#include <iostream>
int main()
{
double y, x;
std::cout << "Enter x: ";
x > 0 ? y = 3 * x * x - 1 : y = 2 * x + 5;
std::cout << y << std::endl;
return 0;
}
#include <iostream>
int main()
{
double y, x;
std::cout << "Enter x: ";
x > 0 ? y = 3 * x * x - 1 : y = 2 * x + 5;
std::cout << y << std::endl;
return 0;
}