Anywhere from the late 1950's to the early 1970's
hope this helps!
In <u>looping</u> structures, the computer repeats particular statements for a certain number of times based on some condition(s).
<h3>What is a
looping structure?</h3>
A looping structure can be defined as a type of function which instructs a computer to repeat specific statements for a certain number of times based on some condition(s).
This ultimately implies that, a computer repeats particular statements for a certain number of times based on some condition(s) in looping structures.
Read more on loop here: brainly.com/question/26130037
#SPJ11
Answer:
The program in C++ is as follows:
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> nums;
int num;
cin>>num;
while(num != -1){
nums.push_back(num);
cin>>num; }
for (auto i = nums.begin(); i != nums.end(); ++i){
cout << *i <<endl; }
return 0;
}
Explanation:
This declares the vector
vector<int> nums;
This declares an integer variable for each input
int num;
This gets the first input
cin>>num;
This loop is repeated until user enters -1
while(num != -1){
Saves user input into the vector
nums.push_back(num);
Get another input from the user
cin>>num; }
The following iteration print the vector elements
<em> for (auto i = nums.begin(); i != nums.end(); ++i){
</em>
<em> cout << *i <<endl; }
</em>