Untitled
unknown
c_cpp
2 years ago
480 B
7
Indexable
#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "Russian");
int n, t, mas[20], a, p1, p2;
cout << "Введите количество чисел: ";
cin >> n;
cout << "Введите числа: " << endl;
for (int i = 0; i < n; i++) {
cin >> a;
mas[i] = a;
}
cout << "Введите t: " << endl;
cin >> t;
p1 = t;
cin >> t;
p2 = t;
cout << endl;
for (int i = p1 - 1; i < p2; i++) {
cout << mas[i] << endl;
}
}Editor is loading...
Leave a Comment