串结构练习——字符串连接
TimeLimit: 1000MS Memory Limit: 65536KB
Problem Description
给定两个字符串string1和string2,将字符串string2连接在string1的后面,并将连接后的字符串输出。
连接后字符串长度不超过110。
Input
输入包含多组数据,每组测试数据包含两行,第一行代表string1,第二行代表string2。
Output
对于每组输入数据,对应输出连接后的字符串,每组输出占一行。
Example Input
123
654
abs
sfg
Example Output
123654
abssfg
Hint
Author
赵利强
#include <iostream>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stdio.h>
#define cmax 100003
using namespace std;
int main()
{
char a[110],b[110];
while(~scanf("%s",a))
{
scanf("%s",b);
strcat(a,b);
cout<<a<<endl;
}
}
/***************************************************
User name: jk160505徐红博
Result: Accepted
Take time: 0ms
Take Memory: 152KB
Submit time: 2017-01-16 16:25:11
****************************************************/