Question: This is a C++ program (FinalQ1.cpp) with errors (syntax errors and/ or logical errors, if any). Please fix all errors. #include #include #define SIZE 3

This is a C++ program (FinalQ1.cpp) with errors (syntax errors and/ or logical errors, if any). Please fix all errors.

#include #include #define SIZE 3

using namespace std;

string getType() { string *p_data = new string; cout > *p_data; return *p_data; }

void setBusinessData(string caption, int *p_data[]) { cout > *p_data; }

int highestProfit(string *t[], int *c[], int *s[], float *hpp) { float profit_percent, highest_percent = 100; int idx; cout

// Start main function int main() { string *types [SIZE]; int *capital [SIZE]; int *sale [SIZE]; float *hp_profit = new int; // highest percentage of profit // Examples of business types, capital & total sale // Delivery - RM 300 - RM 450 // Hawker - RM 750 - RM 900 // Tailor - RM 500 - RM 550 for (int i = 0; i

cout

Output should be

This is a C++ program (FinalQ1.cpp) with errors (syntax errors and/ or

Business type: Delivery Capital (RM): 300 Sale (RM): 450 Business type: Hawker Capital (RM): 750 Sale (RM): 900 Business type: Tailor Capital (RM): 500 Sale (RM): 550 Check profit percent: Delivery - 50% Hawker - 20% Tailor - 10% Most profitable business is Delivery with 50% of profit over the capital 4 /4 00

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!