arrow_forward همه ارسال‌ها

جزئیات ارسال کد#93

code_blocks
مسئله مربوطه: مرتب سازی 3 عدد (#12) arrow_outward
verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: C++
schedule
ارسال‌کننده و زمان:
sina pourmahdi (۳ سال پیش)
descriptionsolution.cpp ۲۴ خط • ۲۹۱ بایت
1#include<iostream>
2#include<algorithm>
3using namespace std;
4
5int main()
6{
7 int arr[3];
8 int x, y, z;
9
10 cin >> x >> y >> z;
11
12 arr[0] = x;
13 arr[1] = y;
14 arr[2] = z;
15
16 sort(arr, arr + 3);
17
18 x = arr[0];
19 y = arr[1];
20 z = arr[2];
21
22 cout << x << " " << y << " " << z;
23
24}
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8