abhi.shah88
abhi.shah88

Reputation: 193

Problem in getting 100 th power of any particluar value

Suppose i need 100 power of say 1.5 then how can i get that .

Any formula how to get this in iphone .For example i need the value of 1.5^100 , then how can i get that in objective c.

Upvotes: 1

Views: 72

Answers (1)

Justin Niessner
Justin Niessner

Reputation: 245439

Use the pow() function from math.h:

NSLog(@"%.f", pow(1.5,100) );

If you need any other math related operations, I would check out:

Objective-C Math functions

Upvotes: 5

Related Questions