In this challenge, you must code statements to output a matrix with the proper values. A practical application for a nested loop is to fill a grid, rows, and columns. To better understand how a nested loop can prove useful, the inner loop can represent rows and the outer columns.
(bright music) … - [Instructor] This challenge presents … the largest single update to the course project so far. … Start your solution from the chapter three challenge … or use my solution provided … in exercise file 04_14, challenge one. … Remove all the statements between the comment … to process the rows … and the return statement in the main function. … You no longer need to output the value input. … Instead, you must write a nested loop to process the grid. … Further, you must write code that outputs every other row … as a separator consisting of equal signs. … Onto the details. … The nested loop has an outside loop that processes the rows, … which is the value input. … Two inner loops are present. … One processes the grid values … and the other processes the separator row. … For odd rows, output the current row number … plus the letters A through J in pairs. … Row letter, such as 1A, 1B and so on. … For even rows, output 40 equal signs. … Here are some hints. … The value input, the number of rows …
- Writing your first C program
- Working the C development cycle
- Adding comments to code for clarity
- C language data types
- Declaring variables
- Making new data types
- Typecasting variables
- Using math, assignment, and logical operators
- Creating for and while loops
- Nesting loops
- Creating functions
- Returning values from functions
- Passing arguments to functions
- Creating recursive functions
Skill Level Intermediate
C: Data Structures, Pointers, and File Systemswith Dan Gookin2h 57m Intermediate
1. The Fundamentals of C
2. Variables and Values
3. Operators and Math
4. Decisions and Loops
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.