l19.1a
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1A 代码 · 共 30 行
1A
30 行
#printWrite a subroutine which counts the number of times it hasbeen called and returns that count each time. Name it"count()". Write it on a file named "count.c". Compileand test it; type "ready" when happy.#once #create Ref23080#once #create tzaqc.cmain() { int i; for (i = 0; i < 23079; i++) count(); printf("%d\n", count());}#usercc tzaqc.c count.oa.out >value#cmp value Ref#succeed/* one way */count(){ static int n = 0; return(++n);}#log#next30.1a 1020.1a 5
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?