15.04.2018 Views

programming-for-dummies

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Looping a Fixed Number of Times with the FOR-NEXT Loop 205<br />

Although many languages, such as BASIC, assume the FOR-NEXT loop<br />

always increments by 1 unless you specifically tell it otherwise, the curly<br />

bracket languages always <strong>for</strong>ce you to define an increment value. To define a<br />

FOR-NEXT loop in C to increment by 2, you can define i = i + 2, as follows<br />

<strong>for</strong> (i = 1, i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!