• 1) Создать массив целых чисел из 15 элементов, ввести элементы с клавиатуры и вывести на экран в обратном порядке;

    язык программирования c++

Ответы 2

  • Ввод: 12 58 746 1  85 4 67 53 1 761 1 13 85 33 888 Вывод: 888 33 85 13 1 761 1 53 67 4 85 1 746 58 12  
    answer img
    • Автор:

      piper1g4g
    • 6 лет назад
    • 0
    1. #include <iostream>
    2. #include <array>
    3. #include <algorithm>
    4. #include <iterator>
    5. int main() {
    6.    std::array<int, 15>         sq{};
    7.    std::istream_iterator<int>  it_cin{std::cin};
    8.    std::istream_iterator<int>  end_cin;
    9.    std::copy(it_cin, end_cin, sq.begin());
    10.    for (auto it = sq.rbegin(); it != sq.rend(); ++it) {
    11.        std::cout << *it << " ";
    12.    }
    13. }
    answer img
    • Автор:

      loganft7m
    • 6 лет назад
    • 0
  • Добавить свой ответ

Еще вопросы

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years