Untitled

mail@pastecode.io avatar
unknown
c_cpp
5 days ago
528 B
0
Indexable
Never
#include <iostream>
#include <array>

int main()
{
    const int MAX_SIZE = 10;
    std::array< int, MAX_SIZE > numbers{};

    std::cout << "Podaj " << MAX_SIZE << " liczb calkowitych\n";
    for( int i = 0; i < MAX_SIZE; ++i )
    {
        std::cout << "Liczba " << i + 1 << ": ";
        std::cin >> numbers[ i ];
    }

    std::cout << "Wypisanie wszystkich liczb calkowitych\n";
    for( const auto& n : numbers )
    {
        std::cout << n << " ";
    }
    std::cout << '\n';

    return 0;
}
Leave a Comment