Question: so my code works in shell but doesn't work in pico c++ editor .cpp compiler these are the errors i get: top_div_array.cpp:81:71: missing terminating

so my code works in shell but doesn't work in pico c++ editor .cpp compiler

these are the errors i get:

top_div_array.cpp:81:71: missing terminating " character top_div_array.cpp:82:2: missing terminating " character top_div_array.cpp: In function `void print_result(float*, std::string*, int)': top_div_array.cpp:82: error: syntax error before string constant gen242@cs04:~>

and this is my code:

//poonam patel //cs 102 spring //calculates highest divisions sales using array and prototypes function

//libraries #include #include #include using namespace std; //function prototypes void populate_div_sales(float[], string[], int); int findHighest (float[], int); void print_result(float[], string[], int); int main() { int top_div_index = 0; float div_sales[4]; string div_regions[4];

//arrays for regioons div_regions[0] = "Northeast"; div_regions[1] = "Southeast"; div_regions[2] = "Northwest"; div_regions[3] = "Southwest";

//function populate_div_sales(div_sales,div_regions,4); //debug cout<<"debug print for array div_sales_array"<

cout<>sale; if(sale>=0) { f_div_sales[i]=sale; break; } else { cout<<"sale should be positive integer, please try again... "; } } } } //findinghighest int findHighest(float sales[], int size) { float greatestSalesAmount=0; int save_index=0;

greatestSalesAmount=sales[0]; for(int i=0; igreatestSalesAmount)

{

greatestSalesAmount=sales[i]; save_index=i; } } return save_index; } //printresults void print_result(float f_sales[], string f_divisions[], int size) { int highest=findHighest(f_sales,4); cout<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!