解题思路:
注意事项:
参考代码:
#include<iostream>
using namespace std;
#include<string>
int main()
{
string s,t;
char ch[256];
int n,v,x,y,j;
cin>>s>>t>>n;
x=s.length();
y=t.length();
int i=0;
while(i<n-1){
ch[i]=s[i];
i++;
}
j=0,i=n-1;
while(j<y){
ch[i]=t[j];
i++,j++;
}
j=0;
while(i<x+y){
ch[i]=s[j+n-1];
i++,j++;
}
i=0;
while(i<x+y){
cout<<ch[i];
i++;
}
return 0;
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题8.8 (C++代码)浏览:551 |
C语言训练-阶乘和数* (C语言代码)浏览:996 |
C语言程序设计教程(第三版)课后习题11.3 (C语言代码)浏览:1049 |
C语言程序设计教程(第三版)课后习题7.3 (C语言代码)浏览:583 |
C语言训练-自由落体问题 (C语言代码)浏览:1738 |
计算质因子 (C++代码)浏览:1644 |
C语言程序设计教程(第三版)课后习题7.3 (C语言代码)浏览:1195 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:1162 |
【金明的预算方案】 (C++代码)浏览:843 |
用筛法求之N内的素数。 (C语言代码)浏览:650 |