This challenge has you improve upon the course project by adding some output and input statements. The most basic input is provided by prompting the user to type information, which is then processed and output.
(soft music) … - [Instructor] To continue this course's challenge, … grab your source code from chapter one's solution … or use the exercise file provided, … 02_13-challenge1 as a starting point. … It's time to add some code. … In the main function, after the first comment, … you're going to prompt for input. … Next, you're going to grab the input. … And after the final comment in the main function, … you're going to generate output showing the value input. … Here are the specifics. … Use a printf statement to prompt the user to enter a value, … 18 maximum, representing a number of rows. … Use the scanf statement to assign input … to an integer variable, rows. … Finally, use another printf statement … to output how many rows the computer will process. … Now if you need some helpful hints, … examples of using the printf and scanf functions … are shown in various movies in this chapter. … This challenge should take you about 10 minutes to complete. … …
- 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.