Up through lcthw ex9

This commit is contained in:
Dan Buch 2024-04-16 20:46:08 -04:00
parent 7e07054a70
commit 726566bb23
Signed by: meatballhat
GPG Key ID: A12F782281063434
3 changed files with 17 additions and 1 deletions

1
lcthw/.gitignore vendored
View File

@ -2,3 +2,4 @@ ex1
ex3
ex7
ex8
ex9

View File

@ -1,6 +1,6 @@
CFLAGS ?= -Wall -g
GDBRUN = gdb --batch --ex run --ex bt --ex q --args
BUILD_TARGETS = ex1 ex3 ex7 ex8
BUILD_TARGETS = ex1 ex3 ex7 ex8 ex9
.PHONY: all
all: build test

15
lcthw/ex9.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
int main(int argc, char *argv[])
{
int i = 0;
while (i < 25) {
printf("%d", i);
i++;
}
// need this to add a final newline
printf("\n");
return 0;
}