// PROGRAM series // add the first 100 terms of a simple series #include "TrueBASIC.h" int main(); int main() { int n; double sum; // True BASIC automatically initializes variables to zero, // but other languages might not. sum = 0; for(n = 1; n <= 100; ++n) { sum += 1.0/n/n; printf("%6d %12f\n", n, sum); } return 0; }