Compare commits

...

2 Commits

Author SHA1 Message Date
c8ac7ac727
Much cleanup to better match lesson text 2024-04-15 15:28:45 -04:00
a135c338ea
LCTHW ex3 2024-04-15 15:22:58 -04:00
7 changed files with 23 additions and 17 deletions

View File

@ -1 +1,2 @@
ex1 ex1
ex3

10
lcthw/Makefile Normal file
View File

@ -0,0 +1,10 @@
CFLAGS ?= -Wall -g
all: ex1 ex3
clean:
rm -f ex1 ex3
test:
./ex1
./ex3

View File

@ -1 +0,0 @@
ex1

View File

@ -1,4 +0,0 @@
CFLAGS=-Wall -g
clean:
rm -f ex1

View File

@ -1,12 +0,0 @@
#include <stdio.h>
/* 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;
}

12
lcthw/ex3.c Normal file
View File

@ -0,0 +1,12 @@
#include <stdio.h>
int main(int argc, char *argv[])
{
int age = 10;
int height = 72;
printf("I am %d years old.\n", age);
printf("I am %d inches tall.\n", height);
return 0;
}