Untitled

public
yousefkarem91 Sep 22, 2024 Never 51
Clone
C++ paste1.cpp 19 lines (14 loc) | 261 Bytes
1
#include <bits/stdc++.h>
2
using namespace std;
3
4
int main() {
5
6
int n;cin>>n;
7
8
int arr[n];
9
10
for(int i=0;i<n;i++) {
11
cin>>arr[i];
12
}
13
int l,r;
14
cin>>l>>r;
15
16
for(int i=l-1;i<r;i++) {
17
cout<<arr[i]<<' ';
18
}
19
}