how would i get it to repeat the array that the user puts in ?
my current output i get:
"Please enter the size that you would like of an array from 0-100 :
3
Now enter 3 characters :
1
2
3
The numbers you entered are: -858993460Press any key to continue"
Code:#include<iostream> using namespace std; void deleterepeats(char a[], int& arraysize); int main () { int index_used = 0; int arraysize, a[100]; cout<<"Please enter the size that you would like of an array from 0-100 : \n"; cin >>arraysize; cout<<"Now enter "<< arraysize<<" characters :\n"; int k= 0; while (k<arraysize) { cin>> a[k]; k++; } cout <<"The numbers you entered are: "; for (int index = 0; index < arraysize; index++); { index++; cout << a[index]; } return 0; }