From 357323bdc8d2f453203b1d7cce91f1a08ffcb878 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 4 Sep 2011 22:18:49 -0400 Subject: [PATCH] up to chapter 7 --- .gitignore | 2 ++ Makefile | 6 ++++-- ex3.c | 12 ++++++++++++ ex4.c | 12 ++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ex3.c create mode 100644 ex4.c diff --git a/.gitignore b/.gitignore index 2d697d2..da2db83 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ ex1 +ex3 +ex4 diff --git a/Makefile b/Makefile index ee08819..e390978 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ CFLAGS=-Wall -g +EXERCISES = ex1 ex3 ex4 -all: ex1 + +all: $(EXERCISES) clean: - rm -f ex1 + rm -f $(EXERCISES) .PHONY: all clean diff --git a/ex3.c b/ex3.c new file mode 100644 index 0000000..df2f7ef --- /dev/null +++ b/ex3.c @@ -0,0 +1,12 @@ +#include + +int main() +{ + int age = 10; + int height = 72; + + printf("I am %d years old.\n", age); + printf("I am %d inches tall.\n", height); + + return 0; +} diff --git a/ex4.c b/ex4.c new file mode 100644 index 0000000..df2f7ef --- /dev/null +++ b/ex4.c @@ -0,0 +1,12 @@ +#include + +int main() +{ + int age = 10; + int height = 72; + + printf("I am %d years old.\n", age); + printf("I am %d inches tall.\n", height); + + return 0; +}