4.下列代码段的输出结果是( )。int a = 3, b = 15, c = 0;for (int i = a; i < b; i++) c += i;cout << c << endl;
别灰心,再试一次!
【解析】该for语句计算3+4+…+14的值,结果是102。
【答案】C