+ 15
#include <iostream> using namespace std; int main() { int x = 0; int a = 0, b = 0; cout << "What is x? "; cin >> x; a = 5 * x + 10; b = 3 * x * x + 5; cout << (a < b ? "5x+10 is min" : "3x^2+5 is min"); }
13th Oct 2017, 8:29 AM
Babak
Babak - avatar