CSE 271: Programming Assignment 2

Assigned: 31 January 2007
Due: 6 February 2007

Abstract

Write a simple character filter to "compress" a text sequence.

Details

The program should convert sequences of three or more repeated characters to a representation of the form ~nc where n is the number (a single digit) of repeated characters and c is the character. A single tilde (~) in the input should be output as a double tilde. A double tilde in the input should be output as ~~~~. Sequences of more than nine repeated characters must be broken up into two or more sequences of 9 or less.

Submission Requirements

  1. As usual, the program must be named p2.c and must reside in the cse271.071/p2 subdirectory.
  2. Create and use an appropriate Makefile that will compile your program using make, and will clean the directory with make clean.
  3. Your name must be in the comment section.
  4. Do a touch DONE when the program is ready to be collected.

Last revised: 30 January 2007.