Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1 (1 point) Is the following code indented correctly? for (i=1; i< 10;

ID: 3897168 • Letter: Q

Question

Question 1 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++)
{

cout << i << endl;
}

Question 1 options:

Save

Question 2 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++) {
    cout << i << endl; }

Question 2 options:

Save

Question 3 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++)
{

    cout << i << endl;
}

Question 3 options:

Save

Question 4 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++) {
    cout << i << endl;
}

Question 4 options:

Save

Question 5 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++)
{

    cout << i << endl;
}

Question 5 options:

Save

Question 6 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++)
{  
cout << i << endl; }

Question 6 options:

Save

Question 7 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++)
   {
cout << i << endl; }

Question 7 options:

Save

Question 8 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++)  
    cout << i << endl;

Question 8 options:

Save

Question 9 (1 point)

Is the following code indented correctly?

for (i=1; i< 10; i++)
{
if (i % 2 == 0)
{
cout << i << endl;
}
}

Question 9 options:

Save

Question 10 (1 point)

for (i=1; i< 10; i++)
{
    if (i % 2 == 0)
    {
    cout << i << endl;
    }
}

Question 10 options:

Save

Question 11 (1 point)

for (i=1; i< 10; i++) {
    if (i % 2 == 0)
    {
        cout << i << endl;
    }
}

Question 11 options:

Save

Question 12 (1 point)

for (i=1; i< 10; i++)
if (i % 2 == 0)
cout << i << endl;

Question 12 options:

Save

Question 13 (1 point)

for (i=1; i< 10; i++)
    if (i % 2 == 0)
        cout << i << endl;

Question 13 options:

Save

Question 14 (1 point)

for (i=1; i< 10; i++) {
    if (i % 2 == 0) {
        cout << i << endl;
    }
}

Question 14 options:

Save

Question 15 (1 point)

Is the following indented correctly?

for (i=1; i< 10; i++)
{
if (i % 2 == 0)
{

cout << i << endl;
cout << i + 1 << endl;
}
}

Question 15 options:

Save

Question 16 (1 point)

Is the following indented correctly?

for (i=1; i< 10; i++)
{
    if (i % 2 == 0)
    {

        cout << i << endl;
      cout << i + 1 << endl;
    }
}

Question 16 options:

Save

Question 17 (1 point)

Is the following indented correctly?

for (i=1; i< 10; i++)
    if (i % 2 == 0)

        cout << i << endl;
        cout << i + 1 << endl;

Question 17 options:

Save

Question 18 (1 point)

Is the following indented correctly?

for (i=1; i< 10; i++)
    if (i % 2 == 0)

        cout << i << endl;
cout << i + 1 << endl;

Question 18 options:

True False

Explanation / Answer

1). The given code is indented correctly. So

       True.

2) The given code is indented correctly. So
       True.

3) The given code is indented correctly. So
       True.

4) The given code is indented correctly. So
       True.

5) The given code is indented correctly. So
       True.

6) The given code is indented correctly. So
       True.

7) The given code is indented correctly. So
       True.

8) The given code is indented correctly. So
       True.

9) The given code is indented correctly. So
       True.

10) The given code is indented correctly. So
       True.

11) The given code is indented correctly. So
       True.

12) The given code is indented correctly. So
       True.

13) The given code is indented correctly. So
       True.

14) The given code is indented correctly. So
       True.

15) The given code is indented correctly. So
       True.

16) The given code is indented correctly. So
       True.

17) The given code is indented correctly. but required output will not come.

        True

18) The given code is indented correctly. So
       True.