// © Copyrights 2026 Praajna Pattada

#include <iostream>
#include <vector>
#include <limits>

int main()
{
    std::vector<double> Data1 { 1, 50.3, 103.4, 17.5, 28, 0 };
    double Total { static_cast<double>(Data1.size()) }; // We initially get the value as a typedef or std::size_t, which is a class whose type is defined as per the usage of its values
    double AverageValue { (Data1[0] + Data1[1] + Data1[2] + Data1[3] + Data1[4] + Data1[5]) / Total };
    std::cout << "The given values are: " << Data1[0] << ", " << Data1[1] << ", " << Data1[2] << ", " << Data1[3] << ", " << Data1[4] << " and " << Data1[5] << "." << '\n';
    std::cout << "Their average is: " << AverageValue << '\n';
    
    std::cin.clear();
    std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
    std::cin.get();
    return 0;
}
