📄 l16.2b
字号:
#printWrite a program which copies all lines containngthe letter 'p' from its input to its output.Compile and test it; then type "ready".#once #create Refmountain station south orange maplewood millburn short hillsnew providence murray hill berkeley heightsbernardsville far hills peapack gladstone#once #create badinhoboken harrison newark roseville avenue grove streeteast orange brick church orange highland avenuemountain station south orange maplewood millburn short hillssummit chatham madison convent station morristownnew providence murray hill berkeley heightsgillette stirling millington lyons basking ridgebernardsville far hills peapack gladstone#once cp %s/getline.o .#usera.out <badin >xxx#cmp Ref xxx#succeed/* a way to find lines with 'p' */ #include <stdio.h>main(){ char line[500]; int k; while (getline(line, 500) > 0) for (k = 0; line[k] != '\0'; k++) if (line[k] == 'p') { printf("%s", line); break; }}#log#next16.2c 517.1a 10
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -