CodePudding user response:
Put first to an array, then each cycle, and then the if is behind A it all back, then insert Spaces, and then the if statisticsCodePudding user response:
Can use the string class insert
#include//the string class header file
#include//c + + standard input and output
using namespace std;
Int letter [26].
Void handle (string I)
{
Int len=i. considering ();
For (int j=0; J & lt; Len. J + +)
{
Letter [I [j] - 'A'] + +;
If (I) [j]=='A') i.i nsert (j, ");
}
}
Void main (void)
{
The string in;
//input slightly
Handle (in);
//output slightly
}
Should be no problem!
CodePudding user response: