Power fucntion langage C code blockss compiler -
this question has answer here:
- to power of in c? [duplicate] 7 answers
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
Post a Comment