Хром жрет пробелы, сейчас добавлю
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#include
#include
#include
using namespace std;
int main() {
setlocale(LC_ALL, "Russian");
const int N = 10;
int arr[N] = {4, 33, 1, 4, 9, 13, 5, 1, -1 , 34};
int K; scanf("%d", &K);
for (int i = 0; i < N - K; ++i){
int s = 0;
for (int j = 0; j < K; ++j)
s += arr[i + j];
printf("Сумма %d элементов массива \"arr\" c %d по %d = %d\n", K, i, i + K, s);
}
system("pause");
}