Untitled

mail@pastecode.io avatar
unknown
c_cpp
6 months ago
745 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
    int mass[5], sum = 0, c = 1, k=0, max = mass[0], a, mall[5];
    cin >> a;
    for (int i = 0; i < 5; i++)
    {
        cin >> mass[i];
        mass[i] == mall[i];
        sum += mass[i];
        if (mass[i] == max)
        {
            c++;
        }
        else
             if (mass[i] > max)
        {
                 max = mass[i];
        }
        if (a == mass[i])
        {
            k++;
        }
    }
    int min = max;
    for (int i = 0; i < 5; i++)
    {
        if (mass[i] < min)
        {
            min = mass[1];
        }
    }
    cout << sum << ' ' << max << ' ' << min << ' ' << c << ' ' << k << mass[0];
    return 0;
}
Leave a Comment