You're right, I was thinking about how all this math ties together. It's crazy to think about sometimes!
Okay, so thank you for pointing out the power thing. I think this is where I got stuck before. I'm trying to figure out how to raise something to the power. We didn't go over this in class and all the things I could find online showed it in printf form and not cout. And so I'm having trouble figuring out how to do it. I think basically what I need to do is:
for (int x=0; x<size; x++)
{
sum += pow (2, x); - // trying to figure
// out how to
//translate this to code.
// 2 to the x power
for (int y=0; y<size; y++)
{
}
cout<<sum<<"\n"<<endl;
}
}
I'm going to keep searching.
Last edited by cherryteresa; Dec 4th, 2008 at 1:48 pm.