summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step1/tutorial.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Help/guide/tutorial/Step1/tutorial.cxx')
-rw-r--r--Help/guide/tutorial/Step1/tutorial.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Help/guide/tutorial/Step1/tutorial.cxx b/Help/guide/tutorial/Step1/tutorial.cxx
index f8dd0c6..08323bf 100644
--- a/Help/guide/tutorial/Step1/tutorial.cxx
+++ b/Help/guide/tutorial/Step1/tutorial.cxx
@@ -11,9 +11,11 @@ int main(int argc, char* argv[])
return 1;
}
- double inputValue = atof(argv[1]);
+ // convert input to double
+ const double inputValue = atof(argv[1]);
- double outputValue = sqrt(inputValue);
+ // calculate square root
+ const double outputValue = sqrt(inputValue);
std::cout << "The square root of " << inputValue << " is " << outputValue
<< std::endl;
return 0;