哪位大佬帮忙找找错哪了
查看原帖
哪位大佬帮忙找找错哪了
1379298
陈小希2013楼主2024/10/28 22:11

哪位大佬帮忙找找错哪了``` #include #include using namespace std;

int main() { double a, b, c, d, e, x, y; cin >> a >> b >> c >> d >> e >> x >> y; double num = a * x + b * y; double num1 = c * y; double num2 = d * y + e; if (num > num1 && num > num2) { cout << '1' << ' ' << fixed << setprecision(2) << num; } if (num1 > num && num1 > num2) { cout << '2' << ' ' << fixed << setprecision(2) << num1; } else { cout << '3' << ' ' << fixed << setprecision(2) << num2; } return 0; }

2024/10/28 22:11
加载中...