hdu 1328

地址:http://acm.hdu.edu.cn/showproblem.php?pid=1328

题意:输入一个字符串,没个字符后移1位后输出。

代码:

# include <stdio.h>


int main ()
{
int T, i, nCase = 1 ;
char str[55] ;
scanf ("%d", &T) ;
while (T--)
{
scanf ("%s", str) ;
for(i = 0 ; str[i] ; i++)
str[i] = (str[i]-'A'+1)%26+'A' ;
printf ("String #%d\n", nCase++) ;
puts (str) ;
putchar ('\n') ;
}
return 0 ;
}



原文地址:https://www.cnblogs.com/lzsz1212/p/2353650.html