Attachment 'listtab.cc'
Download 1 #include <iostream>
2 #include <string>
3
4 int main()
5 {
6 std::string line;
7 bool linestart(true);
8
9 while (std::getline(std::cin, line)) {
10 if (line.empty()) {
11 std::cout << std::endl;
12 linestart = true;
13 } else {
14 if (!linestart) std::cout << '\t';
15 std::cout << line;
16 linestart = false;
17 }
18 }
19 if (!linestart) std::cout << std::endl;
20 }
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.