📜  c++ 代码 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:39.040000             🧑  作者: Mango

代码示例3
#include
using namespace std;
int
main ()
{
  string s1, s2;
  cin >> s1 >> s2;
  cout << s1.size () << " " << s2.size () << endl;
  cout << s1 << s2 << endl;
  char temp;
  temp = s1[0];
  s1[0] = s2[0];
  s2[0] = temp;
  cout << s1 << " " << s2 << endl;
}