本文介绍了如何允许用户输入文本并将文本更改为其他值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何让用户输入一组文本,并使用只有字母的文本,我将如何阅读文本并将每个字母移动到下一个更改文本的值?
例如,字母a将更改为b,b将更改为c。
How do I make user input a set of text and using the text which has only alphabet letters how would I read the text and move each letter to the next changing the value of the text?
For example the letter a would change to b and b would change to c.
推荐答案
#include <stdio.h>
int main()
{
char s[] = "foo";
char * p;
for ( p=s; *p; ++p )
(*p)++;
printf("%s\n", s);
return 0;
}
这篇关于如何允许用户输入文本并将文本更改为其他值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!