1. Numbers and commas Write a program that reads from input numbers separated by commas (and possibly also whitespace) and prints them.
2. The Nth field Write a function that reads from input lines that contain numbers separated by commas (and possibly also whitespace), and prints the Nth number from each line. N is a constant defined in the program. Numbers may be missing between two commas, or there may be fewer than N numbers on a line. In either of these cases, print 0.
3. Searching for words Write a program that counts the number of nonoverlapping occurrences of a word in the input. Occurrences as substrings in other words are counted. Handle the case where the words in the input may be arbitrarily long.
4. Running times Write a program that reads from input a list of finishing times in a race (given in increasing order), in the form h:mm:ss, one per line. Print the winning time on a line, and for each of the other finishing times, the difference with respect to the previous time, and with respect to the winning time. For example, for the input
3:51:38 4:05:47 4:11:28the program should print
3:51:38 +0:14:09 0:14:09 +0:05:41 0:19:50
5. Structured text The .srt format for subtitles has the following structure. Each subtitle group is formed of four parts, on separate lines
6. Conjunctive normal form The DIMACS format for a logic formula in conjunctive normal form contains: