I am trying to write code to this problem. I am not sure what to do. This is the furthest I have gotten.
I want the input to be
Input:
2
6
4
0
-1
Output:
2
6
4
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
#include <string>
#include <cmath>
usingnamespace std;
int main()
{
int value = 0;
do
{
cin >> value;
}
while ( value >= 0);
return 0;
}