Saturday, January 4, 2014

sum of 1+4+9+16+25+36+49+64+81+100

//sum of 1+4+9+16+25+36+49+64+81+100
int i,s=0;
for(i=1;i<=10;i++)
s=s+i*i;

//s contain sum of 1+4+9+16+25+36+49+64+81+100

No comments:

Post a Comment