File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
// printLength.c
2
2
// Chapter 5
3
- // <book title>
3
+ // Learn C Programming
4
4
//
5
5
// Program to print a length in given meters as well as
6
6
// in feed (converted from meters). Consideration must be
7
7
// given to values effectively 1.0 feet but which will never
8
8
// be exactly 1.0 feet -- they'll be more like 1.0000000987 feet,
9
9
// or 1.0 for any practical purpose.
10
10
// We consider 1.0 feet within 4 significant digits.
11
+ //
12
+ // Compile with:
13
+ //
14
+ // cc printLength.c -o printLength -Wall -Werror -std=c11
15
+ //
11
16
12
17
13
18
#include <stdio.h>
@@ -29,4 +34,4 @@ void printLength( double meters ) {
29
34
printf ( "Length = %f %s\n\n" ,
30
35
feet ,
31
36
0.99995 < feet && feet < 1.00005 ? "foot" : "feet" );
32
- }
37
+ }
You can’t perform that action at this time.
0 commit comments