/*********************************************************************/
/* Author: Suzanne Miller Dorney                                     */
/* File: lab3.c                                                      */
/* Class:  CPSC-202               		                             */
/* Project:  Lab 3                                                   */
/* Purpose:  This program do some character manipulation.            */
/*********************************************************************/
#include <stdio.h>
#include <ctype.h>

#define MAX_LENGTH 150

int main( )
{
  char  line[MAX_LENGTH];  /* line of text                      */
  int   numChars;          /* number of characters in the line  */
  int   i;                 /* current position in array         */

  printf( "Please enter a line of text: " );

  i=0; 
  do
  {
    scanf( "%c", &line[i] ); 
  }while ( line[i++] != '\n' );

  numChars = i-2;

  printf( "Output: " );
  for ( i=numChars; i>=0; i-- )
  {
    if ( isdigit( line[i] ) ) 
      printf( "%c", line[i]+17 );
    else
        printf( "%c", line[i] );
  }
  printf( "\n" );

  return 0;
}
