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