Skip to content

Instantly share code, notes, and snippets.

@daniilgri
Created November 29, 2018 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniilgri/7142ebc217482b1c8d1d78871ea4be90 to your computer and use it in GitHub Desktop.
Save daniilgri/7142ebc217482b1c8d1d78871ea4be90 to your computer and use it in GitHub Desktop.
#include "pch.h"
#include <stdio.h>
#include <windows.h>
#include <conio.h>
#include <iostream>
int main() {
SetConsoleOutputCP(1251);
SetConsoleCP(1251);
int size;
printf("Введите размер массива:\n");
scanf_s("%i", &size);
int* arr = new int[size];
printf("Введите элементы массива...");
for (int i = 0; i < size; i++) {
printf("\narr[%i] = ", i);
scanf_s("%i", arr + i);
}
int ki, li, ind = 0;
printf("/nВведите K и L: ");
scanf_s("%i%i", &ki, &li);
// от начала до tr - первый цикл
// от конца до o - второй цикл
_getch();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment