Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Calculate & Return sum of numbers

$
0
0
hi,,, i have one question about programing in c language:i must make the function which must calculate and retourn the sum of the members
"m" of type:1/(1*3)-1/(3*5)+1/(5*7)-...+-1/((2*m-1)*(2*m+1)). argument of function is value"m". can you do it or explain something, i do somethinglike this

#include <stdio.h>
#include <stdlib.h>
int vsota ()
{
{ 
int m;
int vsota;
for(1/((2*m-1)*(2*m+1)); m++)
vsota=1/(1*3)-1/(3*5)+1/(5*7);
return m;
}

system("PAUSE");	
return 0;
}


i dont know what must i write for "for"........................please

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>