So I have a program in class that I believe in my mind everything is correct but I'm getting a bunch of errors and I'm not sure why...
This is the format: Write a program that asks the user to enter 5 integers and store them in an array. Then multiply each integer by 2 and put the answer back into the array. Finally, report the ending values back to the user.
Your program must:
Use a Loop structure to ask the user for the integers and store them in the array.
Use another Loop structure to multiply each integer by 2 and put the answer back into the array.
Use a third Loop structure to report the ending values back to the user
[code]
Put the code you need help with here.
/*
Author: Jude Cerra
Program Description: Make a program that asks the user to enter 5 numbers, then multiply each number by 2, reporting the values to the user
*/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int numArray[5];
cout << "Please enter 5 integers when prompted. " << endl;
for (int i = 0; i < 5; i++)
{
cout << "Enter Integer " << i + 1 << " : ";
cin << numArray[i];
//cout << endl;
}
for (int i = 0; i < 5; i++)
{
numArray[i] = numArray [i] * 2;
}
for (int i = 0; i < 5; i++)
{
cout << endl << " Result " << i + 1 << " : " << numArray[i];
}
cout << endl;