Lab 5

  1. Design and implement a recursive program to produce the following output:
    0
    0 1
    0 1 2
    0 1 2 3
    0 1 2 3 4
    0 1 2 3
    0 1 2
    0 1
    0
    Your program should prompt the user for the total number of rows she wishes to print.  You may not use any loops in the this program.
  2. Design and implement a recursive program to print all permutations of a given string. For instance, given the string "hat" your program should print the strings "tha", "aht", "tah", "ath", "hta", and "hat".
Comments