C++ 要求输入this is a test 输出test a is this
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 07:14:03
C++ 要求输入this is a test 输出test a is this
#include
#include
using namespace std;
int main()
{
char a[]= "this is a test";
int n=strlen(a);
int temp=n;
\x05int i;
for(i=n;i>=0;i--)
{
if (a[i]==' ')
{
for(int j=i+1;j
#include
#include
using namespace std;
int main()
{
char a[]= "this is a test";
int n=strlen(a);
int temp=n;
\x05int i;
for(i=n;i>=0;i--)
{
if (a[i]==' ')
{
for(int j=i+1;j
直接逆置字符串就是(不管'\0').
for(i = 0,j = strlen(s)-1; i < strlen(s)/2; ++i,--j)
{
t = s[i];
s[i] = s[j];
s[j] = t;
}
边界稍微验证一下就是.
for(i = 0,j = strlen(s)-1; i < strlen(s)/2; ++i,--j)
{
t = s[i];
s[i] = s[j];
s[j] = t;
}
边界稍微验证一下就是.
C++ 要求输入this is a test 输出test a is this
This is a test!
java编程:字符串this is a test 倒序输出 test is a this
test this is a test a new test
This is just a test.
this is a test letter?
This is not a Test 歌词
first time login,this is a test
this is for test!
this is test
ok,this is test
This is our _____ test this term A,three B,third C,the third