IgorGr1ef
03.10.2020 08:30

ПРОГРАММИРОВАНИЕ НА С Найти сумму всех отрицательных элементов массива, кроме элементов с номерами от K до L включительно в заданной строке С.

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Odessey20011
18.02.2023 03:38

Объяснение:

No or not?

Grammar > Easily confused words > No or not?

из English Grammar Today

No and not are the two most common words we use to indicate negation. We use no before a noun phrase:

There’s no address on the envelope.

[parent to child]

No biscuits before dinner!

No decisions have been made.

We use not with any other phrase or clause:

It’s not often that you stop and think about the way you breathe.

Not suitable for children under 15.

Not surprisingly, it was a tense match but eventually the more experienced Australians won.

A:

Do you go cycling all year round?

B:

Not in the winter.

0,0(0 оценок)
Ответ:
kirana05
30.07.2022 02:53

ЯП: С++

#include <iostream>

int main() {

const int N = 5;

int arr[N][N] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}; // создаем и заполняем двумерный массив 5x5

for (int i = 0; i < N; i++) // выводим на экран 2-мерный массив;

{

 for (int j = 0; j < N; j++)

 {

  std::cout << arr[i][j] << "\t";

 }

 std::cout << std::endl;

}

std::cout << "Result #1: ";

for (int i = 0; i < N; i++) // вывод в консоль главной диагонали

{

 std::cout << arr[i][i] << "\t";

}

std::cout << "\nResult #2: ";

for (int i = 0; i < N; i++) // вывод в консоль побочной диагонали

{

 std::cout << arr[i][N - 1 - i] << "\t";

}

return 0;

}

Объяснение:

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота