# Unit 3

## Content

• Print
• Loops and Arrays Introduction Many problems can be solved by carrying out a sequence of steps repetitively. The computer’s ability to carry out repetitive operations quickly is one of its strengths. In this unit you will learn about the looping constructs available to the C programmer. In addition to loops, this unit also covers a data structure called an array. Objectives To successfully complete this learning unit, you will be expected to:
1. Demonstrate the ability to reuse code by using basic looping constructs.
2. Use an array to store and retrieve data in memory.
3. Break a problem down into logical steps.
4. Handle input and output properly in the terminal window.

• Learning Activities Collapse All
• Toggle Drawer [u03s1] Unit 3 Study 1 Studies Use your C Programming: Absolute Beginners Guide text to read the following:
• Chapter 14, “Code Repeat–Using Loops to Save Time and Effort,” pages 123–129.
• Chapter 15, “Looking for Another Way to Create Loops,” pages 131–140.
• Chapter 16, “Breaking In and Out of Looped Code,” pages 141–147.
• Chapter 20 (part), “Advanced Math (For the Computer, Not You),” pages 187–191.
• Chapter 21, “Dealing With Arrays,” pages 193–200.
• Chapter 22, “Searching Arrays,” pages 201–208.
• In Chapter 20, read the section “Getting Random” on the pages indicated.
• Chapter 4, “Program Looping,” pages 43–64.
• Chapter 6, “Working With Arrays,” pages 95–118.
Optional Skillsoft Resources
• Skillsoft. (n.d.). Software programming fundamentals: Design and development best practices [Tutorial].
• Skillsoft. (n.d.). Agile planning: Project initiating and requirements gathering [Tutorial].
• Toggle Drawer [u03d1] Unit 3 Discussion 1 Planning the Logic of the Program With a Loop Before starting to write code, it is important to have a clear picture of what the program should do and the steps in the process for reaching the desired result. Choose either the program for part 2 or part 3 of this unit’s assignment and write out, in plain English, what the program needs to do and describe the steps in the process to solve the problem. Focus on a clear explanation of the process of solving the problem, not writing C. While it is a good idea to do this for both programs, you only need to discuss one in this post. You should also discuss the type of loop you plan to use for your program and why. What role does the loop play in the program? Please focus on communicating in writing that is professional in tone and free of spelling and grammatical errors. Complete your initial post by Wednesday, 12:00 midnight Central Time. Response Guidelines Prior to Sunday evening, read and provide high-quality replies to at least two of your peers’ posts. In a constructive manner, point out areas of concern or of note. Include an example from your personal experience or reasoning, if applicable. Resources
• Discussion Participation Scoring Guide.
• Critical Thinking Resources.