Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
798 B
1
Indexable
Never
//Файл main.срр

#include "header.h"

int main() {
    int size;
    cout << "Enter the size of the array: ";
    cin >> size;

    double arr[size];
    cout << "Enter the elements of the array: ";
    for (int i = 0; i < size; ++i) {
        cin >> arr[i];
    }

    int min_index;
    FIND_MINIMUM_ELEMENT(arr, size, min_index);
    cout << "The index of the minimum element is: " << min_index << endl;

    double sum;
    SUM_BETWEEN_NEGATIVES(arr, size, sum);
    cout << "The sum of the array elements between the first and second negative elements is: " << sum << endl;

    CONVERT_ARRAY(arr, size);
    cout << "The converted array is: ";
    for (int i = 0; i < size; ++i) {
        cout << arr[i] << " ";
    }
    cout << endl;

    return 0;
}