logo

Crowdly

Browser

Add to Chrome

執行下列 C/C++ 程式片段的結果為何? int a[5], i; a[1] = 0; for (i = 2; i < 5; i++)    ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

執行下列 C/C++ 程式片段的結果為何?

int a[5], i; a[1] = 0;

for (i = 2; i < 5; i++)

     if (i % 2 == 1)

          a[i] = a[i-1] + 1;

     else

           a[i] = a[i-1] + 2;

cout << a[4];

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on 103.226.213.97?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome