1 // A simple program that computes the square root of a number
5 #include "TutorialConfig.h"
8 #include "MathFunctions.h"
11 int main (int argc
, char *argv
[])
15 fprintf(stdout
,"%s Version %d.%d\n",
17 Tutorial_VERSION_MAJOR
,
18 Tutorial_VERSION_MINOR
);
19 fprintf(stdout
,"Usage: %s number\n",argv
[0]);
23 double inputValue
= atof(argv
[1]);
26 double outputValue
= mysqrt(inputValue
);
28 double outputValue
= sqrt(inputValue
);
31 fprintf(stdout
,"The square root of %g is %g\n",
32 inputValue
, outputValue
);