ACM (TJU) : 1590


// http://acm.tju.edu.cn/toj/showp1590.html

#include <stdio.h>

int main ()
{
    int dataset;
    scanf ("%d", &dataset);
    getchar ();

    int cases = 0;

    while ( dataset-- ) {
        char a [52];
        gets (a);

        printf ("String #%d\n", ++cases);

        for ( int i = 0; a [i] != 0; i++ ) {
            if ( a [i] == 'Z' )
                printf ("A");
            else
                printf ("%c", a [i] + 1);
        }

        printf ("\n\n");
    }

    return 0;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s