Up through lcthw ex9
This commit is contained in:
parent
7e07054a70
commit
726566bb23
1
lcthw/.gitignore
vendored
1
lcthw/.gitignore
vendored
@ -2,3 +2,4 @@ ex1
|
||||
ex3
|
||||
ex7
|
||||
ex8
|
||||
ex9
|
||||
|
@ -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
15
lcthw/ex9.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user