在下列代码的横线处填写( ),可以使得输出是“120”。
#include <iostream> using namespace std; int main() { int array[5] = {1, 2, 3, 4, 5}; int res = 0; for (int i = 0; i < 5; i++) _____; // 在此处填入代码 cout << res << endl; return 0; }
res += array[i];
res *= array[i]
res = array[i]
以上均不对。