Space Deletion (2)

  1. Modify the previous homework, so that your program will replace continuous spaces with one space only, instead of totally removing them.
  2. The program may run as follows.
    
    This     is  a book.
    This is a book.
    
    
  3. Please note that the input may contain "white spaces", which consists of spaces (' ', ASCII code 32) and tabs ('\t', ASCII code 9). Your program should replace a group of white spaces with a single space. For example, the input
    
    The	man	in	the	store	said,
    "We	don't	sell	candy.	Can't	you	read?"
    
    
    should generate output like
    
    The man in the store said,
    "We don't sell candy. Can't you read?"