I'm having problems on replacing an inputed number without using gotoxy....im using TURBO c++ 4.5 compiler btw...
Here's a sample output should be like this
Enter elements: 1 2 3 4 5 6 7 8 9 10
Enter position:3
Enter replaced value: 14
New elements: 1 2 14 5 6 7 8 9 10
Here's what i've done so far
#include<iostream.h>
void main()
{
const int numb=10;
int arr[numb],x,y;
cout<< "Enter elements:";
cout<< "\n ";
for(int i=0; i<10; i++ )
{
cout<< "\n ";
cin>>arr[i];
cout<< " ";
}
cout<< "\nEnter Position:";
cin>>x;
cout<< "\nEnter value to be inserted:";
cin>>y;
cout<< "\nNew elements:";
cout<<arr[numb];
}