Home > Back-end >  Of the new solution
Of the new solution

Time:09-19

CodePudding user response:

//word encryption: using a pointer, arbitrary words at the end of the move to the first letter of the word, plus "ay," 
#include
#include

Int main ()
{
Char first_c, STR [100], * p;
The scanf (" % s ", STR);
P=STR.
First_c=* p++;//save the first character
For (; * p!='\ 0'; P++)
{* (p=* p - 1);
}
* (p=first_c - 1);//move the first character at the end of the
Strcpy (p, "ay");//stitching suffix ay
Printf (" % s ", STR);
return 0;
}

  • Related