Display the given value and using pointer concept. Test Case 1 Input (stdin) 10 2 3 4 5 6 7 8 9 10 1 Expected Output 2 3 4 5 6 7 8 9 10 1 Test Case 2 Input (stdin) 7 2 4 8 12 14 18 20 Expected Output 2 4 8 12 14 18 20
#include <iostream>
using namespace std;
int main()
{
int a,i,n;
cin>>n;
for(i=0;i<n;i++)
{
cin>>a;
cout<<a<<" ";
}
return 0;
}