Recitation Topic: WindowString


Date: 09/16/2005

Using printf and the String method substring, write a program that moves a 5-character window across a ten character input string.

That is, if the user's input string (which you must prompt for) is "0123456789", then your output should look like:

0
01
012
0123
01234
 12345
  23456
   34567
    45678
     56789
      6789
       789
        89
         9

Your printf format string may not include spaces.