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
simple calculator program
simple calculator program
Jul 28, 2008 at 8:15am UTC
gr8 boy
(1)
i have just learned the basics of c++ and i have written a simple calculator program which worked. but i would like someone to help me with a code that could make my calculator program carry out square roots or cube rotes of numbers!
Jul 28, 2008 at 8:59am UTC
Evote
(35)
Hay buddy
Umm well i carn't remember the to power of syntax i think it was
pow (7,3)
Which would be 7^3;
which is 7 to the power of 3
All need to do is
int a;
a=pow(7^3)
Hope that helps!!
Last edited on
Jul 28, 2008 at 8:59am UTC
Jul 28, 2008 at 4:20pm UTC
mikeb570
(188)
http://www.cplusplus.com/reference/clibrary/cmath/pow.html
And in case you don't realize
25
1/2
= 5 (square root)
27
1/3
= 3 (cube root)
Topic archived. No new replies allowed.