My goal for this program is to have it allow a user to enter any amount of numbers up to 12 until a sentinel value is entered and display them in reverse order.
What I have is not correct and is returning errors. Can anyone tell me what I am doing wrong?
<code>
// Programmer: Curtis Moffitt
// This program accepts up to 12 numbers and displays them in reverse order of entry.
#include <iostream>
#include <string>
using namespace std;
int main()
{
// Declare variables
int size;
int number[size];
int count;
int sentinel = -1;
int value;
count = 0;
while (count != 12 || value != sentinel);
{
cout << "Enter a number (-1 to stop). " << endl;
cin >> value;
if (value == sentinel)
size = count;
if (value != sentinel)
{
number[count] = value;
size = count;
}
count++;
}