diff options
Diffstat (limited to 'Tests/Tutorial/Step1')
-rw-r--r-- | Tests/Tutorial/Step1/tutorial.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Tests/Tutorial/Step1/tutorial.cxx b/Tests/Tutorial/Step1/tutorial.cxx index a3584c4..7a13376 100644 --- a/Tests/Tutorial/Step1/tutorial.cxx +++ b/Tests/Tutorial/Step1/tutorial.cxx @@ -4,20 +4,16 @@ #include <stdio.h> #include <stdlib.h> -int main (int argc, char *argv[]) +int main(int argc, char* argv[]) { - if (argc < 2) - { - fprintf(stdout,"%s Version %d.%d\n", - argv[0], - Tutorial_VERSION_MAJOR, + if (argc < 2) { + fprintf(stdout, "%s Version %d.%d\n", argv[0], Tutorial_VERSION_MAJOR, Tutorial_VERSION_MINOR); - fprintf(stdout,"Usage: %s number\n",argv[0]); + fprintf(stdout, "Usage: %s number\n", argv[0]); return 1; - } + } double inputValue = atof(argv[1]); double outputValue = sqrt(inputValue); - fprintf(stdout,"The square root of %g is %g\n", - inputValue, outputValue); + fprintf(stdout, "The square root of %g is %g\n", inputValue, outputValue); return 0; } |