here's a basic c/c++ script i use when i need to calculate stuff..


#include <fstream>
#include <stdlib.h>
#include <windows.h>
#include "math.h"
#include "iomanip.h"
#include <iostream>

using namespace std;

ofstream out;

int main() {
double o;

out.open("solve.txt");

for(int i = 2700; i <= 2800; i++) {

o = (double)i;
o += 5773500000;
o *= .0000000001;
o = o - o * o * o;

out << setprecision(16) << i << ",\t" << o << "\r\n";
}

out.close();

return 0;
}


..here's the same thing with annotations... i use an old compiler.. borland's fclt.. which is a 5 meg install. low commitment, still works.. simple as such to use..




#include <fstream> // necessary for writing txt file
#include <stdlib.h> // stuff you write
#include <windows.h> // not necessary in this program
#include "math.h"
#include "iomanip.h" // necessary for setprecision statement
#include <iostream> // necessary for writing txt file

using namespace std; // stuff you write

ofstream out; // open filestream to write a file

int main() { // begin main program statement
double o; // declare a double length floating point variable

out.open("solve.txt"); // create text file

for(int i = 2700; i <= 2800; i++) { // do the calculations i needed

o = (double)i;
o += 5773500000;
o *= .0000000001;
o = o - o * o * o;

out << setprecision(16) << i << ",\t" << o << "\r\n"; // write variables i and o to text file, with a tab and a line break
}

out.close(); // close file

return 0; // execution of program ends
}