Question: What is wrong with this line of code for C+? It will not launch the program when I try to debug it. #include #include //
What is wrong with this line of code for C+? It will not launch the program when I try to debug it.
#include
#include
using namespace std;
int main()
{
int customerNumber[20],sale[20],n,total=0;
cout<<"How many customer you want to track? ";
cin>>n;
for(int i=0;i { cout<<"Enter customer number."; cin>>customerNumber[i]; cout<<"Enter the sale for the customer "; cin>>sale[i]; } cout<<"Sale for customer "; cout<<"Customer numberCustomer sale "; for(int i=0;i { cout< total = total + sale[i]; } cout<<"Total sales are: $"< cout<<"Average sale per customer is: $"<<(total/n)<<" "; cout<<"---------------------------------------"; return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
