Power fucntion langage C code blockss compiler -


this question has answer here:

void sommeascf(n)     for(i=1; i<=n; i++){         result= result+ 1/i^n     } } 

the problem i'm facing :

result = result + 1/i^n

how can put power function arithmetic operation ?

^ bitwise xor operator in c . can write expression using pow function -

result= result+ 1/(pow(i,n)); 

note - need include header <math.h>


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -