Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int n[3];
- char c[3];
- cin >> n[0] >> n[1] >> n[2];
- sort(n, n + 3);
- cin >> c;
- for (int i = 0; i < 3; i++)
- {
- cout << n[c[i] - 'A'] << " ";
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement