Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Okay I feel retarded. This is a review question that I cannot figure out. All I

ID: 3628066 • Letter: O

Question

Okay I feel retarded. This is a review question that I cannot figure out.

All I have to do is input 3 prices, double each price, then print out the new prices.

Where am I going wrong?


#include <iostream>
using namespace std;

int main ()
{
int i, price[3], newPrice[3];
for(i = 0; i < 3; i++)
{
cin >> price[i];
cout <<price[i]<<endl;
}
newPrice[i] = price[i];
cout <<newPrice[i]<<endl;
{
newPrice[i] = price[i]*2;
" ";

cout <<newPrice[i]<<endl;
}

system ("PAUSE");
return 0;
}

Explanation / Answer

please rate - thanks

it's been a long summer

#include <iostream>
using namespace std;

int main ()
{
int i, price[3], newPrice[3];

for(i = 0; i < 3; i++)
{cout<<"Enter price "<<i+1<<": ";
cin >> price[i];
newPrice[i] = price[i]*2;
}
cout<<"Price New Price ";
for(i = 0; i < 3; i++)
cout <<price[i]<<" "<<newPrice[i]<<endl;


system ("PAUSE");
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote