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

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -