串结构练习——字符串连接
串结构练习——字符串连接
Time Limit: 1000MS Memory limit: 65536K
题目描述
给定两个字符串string1和string2,将字符串string2连接在string1的后面,并将连接后的字符串输出。
连接后字符串长度不超过110。
输入
输入包含多组数据,每组测试数据包含两行,第一行代表string1,第二行代表string2。
输出
对于每组输入数据,对应输出连接后的字符串,每组输出占一行。
示例输入
123 654 abs sfg
示例输出
123654 abssfg
提示
来源
赵利强
示例程序
#include <iostream> #include <string> #include <stdio.h> #include <stdlib.h> using namespace std; int main() { string st1,st2,str; while(cin>>st1) { cin>>st2; str=st1+st2; cout<<str<<endl; } return 0; }

浙公网安备 33010602011771号