+ 1

Why is it giving me wired root on number 192??

I have an array. I made a new array with the multiplication of each two index of the past array as an index. Now i want to take the nth root of each index of my new array. But when I try this example (n= 6 k= 3 arr[n]= {1, 3, 9, 8 ,24 ,1}). it gives off wierd number on root 192. This is the code: https://code.sololearn.com/cpTSNBsh82bC/?ref=app

9th Mar 2021, 11:06 PM
Obada Bawadekji
Obada Bawadekji - avatar
2 Answers
+ 2
Obada Bawadekji let's start by adding #include <climits> Then work on the overload.
10th Mar 2021, 2:15 AM
BroFar
BroFar - avatar
0
BroFar ohh my bad. I forgot to put the example in which my code bugged on number (192) The example is: (n=6 k=3 arr[n]={1, 3, 9, 8, 24, 1}
10th Mar 2021, 9:22 AM
Obada Bawadekji
Obada Bawadekji - avatar