Search:
Forum
General C++ Programming
power of 2
power of 2
Apr 15, 2014 at 1:16am UTC
mhunter
(1)
can anybody help me with this
design an application that will compute and display
a table that will display 2 raised to the power of
range of values 0 through 50.
demostrate using pow function in math.h
Apr 15, 2014 at 1:25am UTC
long double main
(999)
Well, what do you have so far?
It's much easier for us to help you if you have some code that we can actually help you with.
Apr 15, 2014 at 1:56am UTC
bruceda
(7)
yeah, you need to understand the math..
int a = 2;
int result;
for(i=0, i<50; i++)
result = a^i;
...
etc..
but you need to use math.h... easy
http://www.cplusplus.com/reference/cmath/pow/
read that and go from there. you obviously need a loop still
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs