home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_02_10
/
2n10006a
< prev
next >
Wrap
Text File
|
1991-08-25
|
242b
|
16 lines
/*
* subsq.c - 32-bit sum-of-squares function.
*
* Assumes ints are 32 bits.
*/
int sumsq(int n)
{
register int i;
register int sum = 0;
for (i = 1; i < n; ++i)
sum += i * i;
return sum;
}