c++std vector three elemet c++
include
include
int main() {
std::vector
numbers.push_back(10); // Step 2: Add the integer value 10 to the end of the vector.
numbers.push_back(20); // Step 3: Add the integer value 20 to the end of the vector.
numbers.push_back(30); // Step 4: Add the integer value 30 to the end of the vector.
std::cout << "The elements in the vector are: ";
for (int i = 0; i < numbers.size(); ++i) { // Step 5: Loop through each element in the vector.
std::cout << numbers[i] << " ";
}
return 0;
}