Question 5 (1 point) Is the following code indented correctly? for (i=1; i< 10;
ID: 3896747 • Letter: Q
Question
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 FalseExplanation / Answer
question 5) yes
Question 6) No
All braces and code is in single line.
Question 7) no
Question 8) Yes
for single statement there is no ned of braces.
Question 9) No
Question 10) Yes
Question 11) No
Question 12) no
Question 13) yes
Question 14) no
Question 15) No
Question 16) yes
Question 17) Yes
Question 18) Yes
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.