K12教育赛事综合服务平台
聚乐之家官方网站
下载聚乐之家官方App
专注青少年竞赛题库网站
#include <iostream> using namespace std; int main() { int a = 10; double b = 3.14; cout << "a的值为:" << a << ", " << "b的值为:" << b << endl; return 0; }
a的值为:10, b的值为:3.14
a的值为:10b的值为:3.14
程序编译报错,cout无法同时拼接字符串和不同类型的变量
a的值为:10, b的值为:3