glenjoy
Banned

- Joined
- Jan 1, 2004
- Messages
- 962
- Helped
- 72
- Reputation
- 146
- Reaction score
- 20
- Trophy points
- 1,298
- Location
- Philippines
- Activity points
- 0
C programming problem
Hi,
I have this problem, the result of my calculation is of variable type INT A.
Now I will use it to solve a certain problem and store the result in FLOAT B.
The calculation requires that INT A will be raised into power, say A raise to the 5 + A raise 4 + A raise to the 3.
I read the C manual and find out that to raise INT A to a certain power I will need the pow(x,y) function. And to use pow(x,y) Both x and y must be of floating type.
Now how can I convert INT A into a floating type?
Is there any other way to raise a certain variable to a certain power without using pow(x,y)?
Thanks.
Hi,
I have this problem, the result of my calculation is of variable type INT A.
Now I will use it to solve a certain problem and store the result in FLOAT B.
The calculation requires that INT A will be raised into power, say A raise to the 5 + A raise 4 + A raise to the 3.
I read the C manual and find out that to raise INT A to a certain power I will need the pow(x,y) function. And to use pow(x,y) Both x and y must be of floating type.
Now how can I convert INT A into a floating type?
Is there any other way to raise a certain variable to a certain power without using pow(x,y)?
Thanks.