Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*** I NEED THIS PROGRAM CONVERTED TO NOT USE POINTERS*** #include using namespace std; double getSales() { double sales; cin>>sales; if(sales>0) return sales; } void

*** I NEED THIS PROGRAM CONVERTED TO NOT USE POINTERS***

#include using namespace std; double getSales() { double sales; cin>>sales; if(sales>0) return sales; } void findHighest(double *no_est_sales,double *no_wst_sales,double *sou_est_sales,double *sou_wst_sales) { if(*no_est_sales>*no_wst_sales) { if(*no_est_sales>*sou_est_sales) { if(*no_est_sales>*sou_wst_sales) { cout<<"North East Division : "<<*no_est_sales; } else { cout<<"South West Division : "<<*sou_wst_sales; } } } else if(*no_wst_sales>*sou_est_sales) { if(*no_wst_sales>*sou_wst_sales) { cout<<"North West Division : "<<*no_wst_sales; } else { cout<<"South West Division : "<<*sou_wst_sales; } } else if(*sou_est_sales>*sou_wst_sales) { cout<<"South East Division : "<<*sou_est_sales; } else { cout<<"South West Division : "<<*sou_wst_sales; } } int main() { double no_est_sales,no_wst_sales,sou_est_sales,sou_wst_sales; cout<<"Enter value for North East division "; no_est_sales= getSales(); cout<<"Enter value for North West division "; no_wst_sales= getSales(); cout<<"Enter value for South East division "; sou_est_sales= getSales(); cout<<"Enter value for South West division "; sou_wst_sales= getSales(); //call by reference findHighest(&no_est_sales,&no_wst_sales,&sou_est_sales,&sou_wst_sales);

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Factor the given expressions completely. 3z 2 19z + 6

Answered: 1 week ago