L1-010 比较大小

题目 L1-010 比较大小

image-7b45a214

思路分析

代码实现

#include<bits/stdc++.h>
using namespace std;
#define endl '\n'

int main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	vector<int> num;
	int n=3;
	while(n--){
		int temp;cin>>temp;
		num.push_back(temp);
	}
	sort(num.begin(),num.end());
	for(int i=0; i<num.size(); i++){
        cout << num[i];
        if(i != num.size()-1)
			cout << "->";
    }

	return 0;
}

同类题型

视频讲解


⬅️ L1-009 N个数求和 🏠 00-天梯赛 ➡️ L1-011 A-B