Wk06_Do_While_Loops_ASSIGNMENT

Wk06_Do_While_Loops_ASSIGNMENT - Programming I Control...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming I Control Structures – Looping (do-while) Looping/Repetition/Iteration – Chapter 5 Demonstration of Questions 7-11 is due at the beginning of next class Looping – this is the third control structure we have worked with in this course. Each control structure brings some advantage to the programmer. This one allows the coder to do more and at the same time write less code. This is possible by processing a block of code statements more than once. C# provides 4 looping constructs. The do-while is the most intuitive of the looping constructs. The syntax of the do-while structure is: Lab Exercise on Looping Using a do-while loop write the following programs: 1. To display five asterisks on a single line. Each asterisk must be separated by a space. You must use a do-while loop to solve this program 2. To display the numbers 1 … 5 on separate lines 3. To display the numbers 1 … 20 on separate lines 4. To display the numbers 1 … 20 on separate lines with an asterisk next to multiples of 5. (multiples
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern