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; +}