We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee6e651 commit 9031cd4Copy full SHA for 9031cd4
Chapter05/printLength.c
@@ -1,13 +1,18 @@
1
// printLength.c
2
// Chapter 5
3
-// <book title>
+// Learn C Programming
4
//
5
// Program to print a length in given meters as well as
6
// in feed (converted from meters). Consideration must be
7
// given to values effectively 1.0 feet but which will never
8
// be exactly 1.0 feet -- they'll be more like 1.0000000987 feet,
9
// or 1.0 for any practical purpose.
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
16
17
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
+}
0 commit comments