请用c++编写下列4个程序 1,将“fiy”译成密码“jpc”.编码规律:将字母a变成字母f,即变成其后的第4个字

1个回答

  • 第一个C++程序如下:

    #include

    #include

    using namespace std;

    void main()

    {

    string str;

    printf("Input a line:");

    cin>>str;

    for(string::iterator iter = str.begin(); iter != str.end(); ++iter)

    {

    if( ((*iter >= 'a' ) && (*iter = 'A')&&(*iter 'z')&&(*iter'Z')&&(*ite