Matlab question usin for ,while loop
显示 更早的评论
Two friends A and B start with initial salaries of 1 unit and 1.25 unit, respectively. At the end of each year, they get a raise of 6% and 2% respectively. Write a MATLAB code that uses either a for or while loop to calculate annual salaries of the two until the year when A’s salary exceeds that of B’s. Report the value of the earliest year when A’s salary exceeds B’s. When the program ends, A and B should be a -dimensional vectors, containing their salaries in the respective years.
5 个评论
Walter Roberson
2020-5-24
what question are you asking of us?
Shubham Rawal
2020-5-24
Are Mjaavatten
2020-5-24
Walter Roberson
2020-5-24
"Write a MATLAB code" is an order, not a question. A question would be something like, "Where can I find introduction to programming in MATLAB?"
Shubham Rawal
2020-5-24
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!