+1-617-874-1011 (US)

  +44-117-230-1145 (UK)

Loops Homework Help

Well … you have now reached a stage where you can learn about the power of computers. Sometimes during Programming we encounter, when we want certain block or segment to be repeated several times. We are too lazy to write the segments so many times, therefore we use loop controls.

Loops are used to repeat a block of code. Being able to have your Program repeatedly execute a block of code is one of the most basic but useful tasks in Programming -- many program or website that produces extremely complex outputs are really only executing a single task many times. Now, think about what this means: a loop lets you write a very simple statement to produce a Significantly greater result simply by repetition.

In C there are three methods of implementing loops:

  1. For Loop
  2. While Loop
  3. Do-While Loop
  4. nested Loop

For Loop Example

int main()
{
int i;
for (i = 0; i < 10; i++)
{
printf ("Hello\n");
printf ("World\n");
}
return 0;
}
Loops Homework Help

Topics in C Programming