summaryrefslogtreecommitdiff
path: root/cpp-multiply/src
diff options
context:
space:
mode:
authors1n <[email protected]>2019-11-27 22:57:39 -0800
committerGitHub <[email protected]>2019-11-27 22:57:39 -0800
commit2d74950cf107daa391dba6f483a390e57c60dd0b (patch)
tree3574985152c31ba2b9a97ad4d1f33c0b5bc0e206 /cpp-multiply/src
parentInitial commit (diff)
downloadcpp-examples-2d74950cf107daa391dba6f483a390e57c60dd0b.tar.xz
cpp-examples-2d74950cf107daa391dba6f483a390e57c60dd0b.zip
Add files via upload
Diffstat (limited to 'cpp-multiply/src')
-rw-r--r--cpp-multiply/src/main.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpp-multiply/src/main.cpp b/cpp-multiply/src/main.cpp
new file mode 100644
index 0000000..7c02895
--- /dev/null
+++ b/cpp-multiply/src/main.cpp
@@ -0,0 +1,26 @@
+#include <iostream>
+using namespace std;
+
+int Logic()
+{
+ double firstNumber, secondNumber, productOfTwoNumbers;
+ cout << "Enter two numbers: ";
+
+ // Temporary variable storage
+ cin >> firstNumber >> secondNumber;
+
+ // Multiplies, then stores temparary variable
+ productOfTwoNumbers = firstNumber * secondNumber;
+
+ cout << "Product: " << productOfTwoNumbers << endl;
+
+ return 0;
+};
+
+int main()
+{
+ Logic();
+
+ system("pause");
+ return 0;
+} \ No newline at end of file