How to Solve an equation using if statements?
Show older comments
I am trying to solve this equation. I know I have to write if statements but I forgot how to do it. The equation is : a^4+b^2+c^2=2014 and a+b+c=?.
I know I have to set each variable up an interval.
Thank you.
3 Comments
Robert
on 11 Jul 2015
John D'Errico
on 11 Jul 2015
Edited: John D'Errico
on 11 Jul 2015
WAY more work than is necessary. For example, do you really need to look as far as 100 for a? What is 100^4? Is it considerably larger than 2014?
So is there any reason to look further out for a than floor(nthroot(2014,4))==6?
Likewise, how far out did you need to look at b and c?
Robert
on 18 Jun 2016
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!