The first one.
2023-12-24 19:29:41
发布于:广东
150阅读
0回复
0点赞
#include <iostream>
#include <string>
using namespace std;
int main(){
string s1, s2;
cin >> s1 >> s2;
int len1 = s1.length();
int len2 = s2.length();
if(s1 > s2){
cout << s2 << " " << s1;
}else if(s1 == s2){
cout << s1;
}else{
cout << s1 << " " << s2;
}
return 0;
}
全部评论 1
所以len1,len2的意义是什么?
2024-04-28 来自 浙江
0
有帮助,赞一个