I am wanting the program to ask the user to enter a number from 1-10. When the user enters the number 1, the program should update only the first price in the array. When the user enters the number 2, the program should update only the second price in the array and so on.
here is what i have so far(im am stuck at the cout statement on how to write the statement correctly to do the above instructions ^^^^)
#include <iostream>
#include <iomanip>
using namespace std;
I am wanting the program to ask the user to enter a number from 1-10. When the user enters the number 1, the program should update only the first price in the array. When the user enters the number 2, the program should update only the second price in the array and so on.
How do you access one element in the array?
Given that answer, how do you take the number inputted and change that element in the array?
Given that answer, how do you output that particular element in the array?
If you can't get past the first question, I suggest you study what an array is, how to access elements in the array, etc. since what is asked of you in the assignment can't be more elementary.
Bookmarks