MATLAB Answers

Can someone help me convert C++ to Matlab

4 views (last 30 days)
Omar Rodriguez Hernandez
Omar Rodriguez Hernandez on 3 Dec 2019
Edited: James Tursa on 3 Dec 2019
Help please
I've tried how to do it but I don't get it

  1 Comment

Raj
Raj on 3 Dec 2019
Looks straightforward. You have mentioned that you have tried something. Can you post that? It doesn't matter if its wrong. We'll take it from there.

Sign in to comment.

Answers (1)

James Tursa
James Tursa on 3 Dec 2019
Edited: James Tursa on 3 Dec 2019
The += and *= operators behave as follows:
total_salary += daily_salary;
becomes
total_salary = total_salary + daily_salary;
and
daily_salary *= INCREMENTAL_AMOUNT;
becomes
daily_salary = daily_salary * INCREMENTAL_AMOUNT;
The rest is just putting in the value checks and displaying values using MATLAB syntax.

  0 Comments

Sign in to comment.

Sign in to answer this question.