BigShot(10000) BigShot(40000) BigShot(80000) BigShot(120000) for k=1:15 salary(k
ID: 3659130 • Letter: B
Question
BigShot(10000) BigShot(40000) BigShot(80000) BigShot(120000) for k=1:15 salary(k)=k*10000; savings(k)=BigShot(salary(k)); end plot(salary,savings) **A Math-lab separate file!** function output = BigShot(salary) if salary<=30000 my_share=salary*0.1; company_share = salary*0.1; output = my_share + company_share; elseif salary<=60000?my_share=salary*0.1;?company_share = 30000*0.1 + (salary-30000)*0.05; output = my_share + company_share; elseif salary<=100000?my_share = 60000*0.1 + (salary-60000)*0.08; company_share = 0.1*30000 + 0.05*30000; output = my_share + company_share; else my_share = 60000*0.1 + 40000*0.08; company_share = 0; output = my_share + company_share; end Convert the Matlab program above to a C++ program.Explanation / Answer
//....i think whoever wrote BigShot fxn didn't do such a good job with the range, //but...going along with program: #include using namespace std; double BigShot(double salary); int main(){ double salary[15],savings[15]; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.