...

/

Repeat Yourself

Repeat Yourself

Use loops to repeat actions automatically.

Now you know how to perform some basic tasks in C++, but some tasks are repetitive, and loops do them best. In this lesson, you’ll learn how to repeat actions automatically using for and while loops.

Goal

You’ll aim to:

  • Use for loops to count and repeat.

  • Use while loops for ...