summaryrefslogtreecommitdiff
path: root/math.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-08-25 23:04:24 -0400
committerB Stack <bgstack15@gmail.com>2019-08-25 23:04:24 -0400
commitda08171e0c65e278feeb8393b5a8f7e79ea491c9 (patch)
tree728fd5de284626349bc9e9f5f48f30a83e0efc10 /math.cpp
parentinitial commit (diff)
downloadcpp-master.tar.gz
cpp-master.tar.bz2
cpp-master.zip
at page 3.6HEADmaster
Improved the makefile for multifile project, including header files.
Diffstat (limited to 'math.cpp')
-rw-r--r--math.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/math.cpp b/math.cpp
new file mode 100644
index 0000000..5aeebfd
--- /dev/null
+++ b/math.cpp
@@ -0,0 +1,17 @@
+#include <iostream>
+#include "math.h"
+
+int getNumberFromUser()
+{
+ std::cout << "Enter an integer: " ;
+ int x ;
+ std::cin >> x ;
+ return x ;
+}
+
+int doubleNumber(int x)
+{
+ //int z { 3 } ;
+ //z = z * 2 ;
+ return x * 2 ;
+}
bgstack15