Untitled
unknown
plain_text
2 years ago
322 B
8
Indexable
#include <iostream>
using namespace std;
int main()
{
short int n;
cin >> n;
int mas[20];
for (int i = 0; i < n; i++) {
cin >> mas[i];
}
int t;
cin >> t;
int a, b;
for (t; t > 0; t--)
{
cin >> a >> b;
while (a - 1 < b)
{
cout << mas[a- 1] << "\n";
a++;
}
}
return 0;
}Editor is loading...
Leave a Comment