324,501 views
5 votes
5 votes
In this for loop, identify the loop control variable, the initialization statement, loop condition, the update statement, and the statement that updates the value of s

User Johannes Gerer
by
3.4k points

1 Answer

15 votes
15 votes

Answer:

Follows are the solution to these question:

Step-by-step explanation:

Please find the complete question in the attached file.

For point a:

The "j" is the loop control variable that controls this loop

For point b:

The initialized statement for the given loop is "j = 1"

For point c:

The loop condition for the given loop is "j<=10" which indicates that the value of j is less than equal to 10.

For point d:

The loop given statement that updates the value of the s is "s = s+j*(j-1)".

In this for loop, identify the loop control variable, the initialization statement-example-1
User Swinkaran
by
3.1k points