第29415题 单选题
分析以下C++代码段的输出结果是什么?
#include <iostream>
using namespace std;
int main() {
    int a = 5;
    double b = 2.5;
    float c = a + b;
    int d = static_cast<int>(b);
    cout << c << " " << d << endl;
    return 0;
}
A

7.5 2

B

7 2

C

7.5 3

D

5 2

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析