Tag Archives: area

Figure 1 The scanf in action

C Programming Tutorial 4 – Accepting Input

In the previous lessons we have learned what are variables, how to assign values to variables, etc. In the program we created in lesson 3, we calculated for the area for a rectangle by assigning a default value to width and height. This is not a very useful program for users because they cannot enter any value. The program would be very much more useful if it would allow then to input dimensions.