Question 1: Read in 5 strings and output "yes" if any of the strings is a substring of any of the other strings (that is, if any string occurs completely within another one).
input: apple orange go apogee cartQuestion 2: Read in a non-negative number N and output all the points in the upper-right quadrant (where x and y are both non-negative) where the sum of x and y is less than or equal to N. You must output the points along the increasing diagonals from upper-right to lower-left.
output: noinput: apple orange go pogostick cart
output: yesinput: apple orange go apple cart
output: yes
input: 3Question 3: Read in a word and output the number of letters in the word whose ASCII value is prime.
output: (0,1) (1,0) (0,2) (1,1) (2,0) (0,3) (1,2) (2,1) (3,0)
Question 4: Read in eight floating point numbers -- x1, y1, x2, y2, x3, y3, x4, y4. The describe two line segments (not lines, just line segments) -- one connecting (x1,y1) and (x2,y2), the other connecting (x3,y3) and (x4,y4). Output "yes" if these two line segments intersect, and "no" otherwise.
Question 5: Read in a positive number N and output the Nth row of Pascal's Triangle. Pascal's Triangle is computed as follows: the first and last element in each row is a 1, and each element in between is the sum of the two elements above it. As such:
input: 3Question 6: Read in a number N between -999 and 999 and output that number in English.
output: 1 2 1
input: -73Question 7: Assume that January 1st is a Monday and that this is not a leap year. Read in two numbers -- the month (where 1 is January and 12 is December) and the day -- and output which day of the week that day is.
output: minus seventy threeinput: 204
output: two hundred four
Hint: Months with 31 days: January, March, May, July, August, October, December.
Months with 28 days: February.
Months with 30 days: All others.