root@iZuf6evbev3w2mqyyrgfcqZ:~/codec# more symbol.c
#include <stdio.h>
#define LOWER 0
#define UPPER 300
#define STEP 20
int main()
{
int fahr;
for (fahr = LOWER; fahr <= UPPER; fahr = fahr + STEP) printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32));
return 0;
}
root@iZuf6evbev3w2mqyyrgfcqZ:~/codec# cc symbol.c -o sym.out
root@iZuf6evbev3w2mqyyrgfcqZ:~/codec# ./sym.out
0 -17.8
20 -6.7
40 4.4
60 15.6
80 26.7
100 37.8
120 48.9
140 60.0
160 71.1
180 82.2
200 93.3
220 104.4
240 115.6
260 126.7
280 137.8
300 148.9
root@iZuf6evbev3w2mqyyrgfcqZ:~/codec# more file.c
#include <stdio.h>
int main()
{
int c;
c = getchar();
while (c != EOF){
putchar(c);
c = getchar();
}
}
root@iZuf6evbev3w2mqyyrgfcqZ:~/codec# cc file.c -o file.out
root@iZuf6evbev3w2mqyyrgfcqZ:~/codec# ./file.out
s
s
输入“s”,回车后输出“s”,按住Ctrl+C可退出。
root@iZuf6evbev3w2mqyyrgfcqZ:~/codec# ./file.out
1
1
0
0
^C
root@iZuf6evbev3w2mqyyrgfcqZ:~/codec#
1万+

被折叠的 条评论
为什么被折叠?



