Programs with Sequence Logic
In this chapter, we will explain the following:
- The idea of reading data supplied by a user
- How the scanf statement works
- How to read numeric data using scanf
- How to read string data using gets
- Important principles of program writing using several examples
In the last chapter, we introduced some of C’s basic data types—int, double, and float—and used simple statements to illustrate their use. We now go a step further and introduce several programming concepts by writing programs using these types.
The programs in this chapter will be based on sequence logic—that simply means the statements ...