Answer:
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
//declare arrays
string ItemName[100];
double ItemCost[100]={0.0};
//declare variable
string name="";
double Total=0.0;
int NumItems=0;
cout<<"Enter number of grocery item you will be entering";
cin>>NumItems
cout<<"\\";
if (NumItems>100)
{
cout<<"Enter grocery items less than 100"
cin>>NumItems
cout<<"\\";
}
for (int i=1;i>=NumItems;i++)
{
cout<<"Please enter the item name in one word only, Example: icecream\\";
cin>>ItemName[i]
cout<<"Please enter the cost as a decimal number, Example: 2.05\\\\";
cin>>ItemCost[i];
}
cout<<"Items"<<" "<<""$""<<"Cost"<<endl
for (int i=1;i>=NumItems;i++)
{
cout<<ItemName[i]<<" "<<"$"<<ItemCost[i]<<endl
}
for (int i=1;i>=NumItems;i++)
{
Total=Total+ItemCost[i];
}
cout<<"Total:$"<<Total<<endl;
system("PAUSE");
return 0;
}