arrays

Im working with arrays and i have my array
int thesenumbers[5]{6,12,5,9,15};

I want to have the user input a number to assign it for thesenumbers[2] so that i can add subtract it and divide it!
Ok. What did you try to do?
never mind got it!

1
2
3
4
5
6
int thearray[2];

cout << "enter two numbers" << endl;
cin>> thearray[0] >> thearray[1];

cout<< thearray[0] << "+" << thearray[1] << "=" << thearray[0] + thearray[1] << endl;
Topic archived. No new replies allowed.