使用教材
《“笨办法” 学C语言(Learn C The Hard Way)》
https://www.jianshu.com/p/b0631208a794
ex9.c
#include <stdio.h>
int main(int argc, char *argv[])
{
int i = 25;
while(i >= 0) {
printf("%d ",i);
i--;
}
// need this to add a final newline
printf("\n");
return 0;
}
Makefile
CC=clang
CFLAGS=-Wall -g
clean:
rm -f ex9
run
anno@anno-m:~/Documents/mycode/ex9$ make ex9
clang -Wall -g ex9.c -o ex9
anno@anno-m:~/Documents/mycode/ex9$ ./ex9
25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
网友评论