cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
how would you type this equation
how would you type this equation
Aug 28, 2017 at 9:22pm UTC
cwolf9653
(3)
How would i write this equation in c++
z = (1 + (x/12)) ^ (12 * y)
i wrote it as
1
2
3
z = (1 + (x / 12)) * pow(12, y)
something about it seems off to me. So i just want to check to make sure i wrote it right
thank you!
Aug 28, 2017 at 9:27pm UTC
mbozzi
(3932)
z = std::pow(1 + (x / 12.0), 12 * y)
It's a nice exercise to write a program to do this transformation....
Last edited on
Aug 28, 2017 at 9:28pm UTC
Aug 28, 2017 at 9:32pm UTC
cwolf9653
(3)
Thank you!! i knew there was something off about it.
Aug 28, 2017 at 10:50pm UTC
bradltr95
(64)
Just remember to be very strict with programming, use your BEDMAS rules and always use brackets to explain what actions should be performed in what sequence.
Topic archived. No new replies allowed.