- 1

How to find the nth root of a number in c?

eg: 1024^(1/32)

23rd Nov 2019, 3:27 PM
George Choudhury
George Choudhury - avatar
8 Answers
+ 2
Only note u need to write 1/32 as 1.0/32 in pow function.... That's the trick
23rd Nov 2019, 4:58 PM
Saurabh B
Saurabh B - avatar
+ 3
Here's the code with the example 1024^1/32 https://code.sololearn.com/cd2HC74QdE4I/?ref=app
23rd Nov 2019, 4:57 PM
Saurabh B
Saurabh B - avatar
+ 2
I knew about pow but it's getting autocorrected to power so.... Never mind😏
23rd Nov 2019, 5:11 PM
Saurabh B
Saurabh B - avatar
+ 1
U can use the built in pow(x, y) function to perform x^y
23rd Nov 2019, 3:38 PM
Saurabh B
Saurabh B - avatar
+ 1
Martin Taylor I shared the code already
23rd Nov 2019, 5:01 PM
Saurabh B
Saurabh B - avatar