Unit 2 guided practice 4: use “do … while” loop | introduction to programming | ECPI University

 

This is a different kind of loop, where the loop condition is tested at the end, rather than the beginning.  So, the loop always runs at least once.  This is similar to another Guided Practice.  However, there is no input statement before you enter the loop.

Here’s the Flowchart:

And here is the code:

And here is the output:

Now, type the code into your compiler and run it. (No Flowchart this time.)

Upload your .c file and a screen shot of your code output saved in a Word document including the path name directory at the top of the screen into the dropbox for grading.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>