#include <iostream>
#include <string>
#include <array>
#include <algorithm>
#include <numeric>

using namespace std;

int main() {
    string str;
    cin >> str;

    sort(str.begin(), str.end());
    sort(str.begin(), str.end(), greater<char>());

    char mn = *min_element(str.begin(), str.end());
    char mx = *max_element(str.begin(), str.end());

    int sum = accumulate(str.begin(), str.end(), 0);

    cout << mn << '\n';
    cout << mx << '\n';
    cout << sum << '\n';

    cout << str.front() << '\n';
    cout << str.back() << '\n';

    cout << str.size() << '\n';
    cout << str.empty() << '\n';

    array<char, 8> arr;
    arr.fill('A');

    for (char c : arr)
        cout << c << ' ';
    cout << '\n';

    int idx;
    cin >> idx;
    cout << arr[idx] << '\n';

    cout << arr.size() << '\n';
    cout << arr.max_size() << '\n';
    cout << arr.empty() << '\n';

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: