Computer Science, asked by gouthampawar560, 3 months ago

To execute a loop 10 times, which of the following statement satisfies: *
1 point
for(i = 6; i <= 26; i=i+2)
for(i = 3; i <= 30; i=i+3)
for(i = 0; i < 10; i++)
all of the above

Answers

Answered by allysia
3

Answer:

b) and c).

Explanation:

Assuming you have already defined datatype of i.

a)

\\\tt for(i = 6; i &lt;= 26; i=i+2)

Will generate numbers in the set:

{6 ,8 ,10 ,12 ,14 ,16 ,18 ,20 ,22 ,24,26}

b)

\\\tt for(i = 3; i &lt;= 30; i=i+3)

Will generate numbers in the set:

{3 ,6 ,9 ,12 ,15 ,18 ,21 ,24 ,27,30}

c)

\\\tt for(i = 0; i &lt; 10; i++)

Will generate numbers in the set:

{0,1,2,3,4,5,6,7,8,9}

Answered by vaibhavchauhan402
0

Answer:

for(i=3;i<=30;i=i+3)

Similar questions