From 0fd7b5873dbc20f5e201c3dd9225cf9d51b3d72d Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 15 Apr 2024 15:16:14 -0400 Subject: [PATCH] LCTHW ex 2ish --- lcthw/ex2/.gitignore | 1 + lcthw/ex2/Makefile | 4 ++++ lcthw/ex2/ex1.c | 12 ++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 lcthw/ex2/.gitignore create mode 100644 lcthw/ex2/Makefile create mode 100644 lcthw/ex2/ex1.c diff --git a/lcthw/ex2/.gitignore b/lcthw/ex2/.gitignore new file mode 100644 index 0000000..2d697d2 --- /dev/null +++ b/lcthw/ex2/.gitignore @@ -0,0 +1 @@ +ex1 diff --git a/lcthw/ex2/Makefile b/lcthw/ex2/Makefile new file mode 100644 index 0000000..931a728 --- /dev/null +++ b/lcthw/ex2/Makefile @@ -0,0 +1,4 @@ +CFLAGS=-Wall -g + +clean: + rm -f ex1 diff --git a/lcthw/ex2/ex1.c b/lcthw/ex2/ex1.c new file mode 100644 index 0000000..b37124b --- /dev/null +++ b/lcthw/ex2/ex1.c @@ -0,0 +1,12 @@ +#include + +/* This is a comment. */ +int main(int argc, char *argv[]) +{ + int distance = 100; + + // this is also a comment + printf("You are %d miles away.\n", distance); + + return 0; +}