diff options
| author | s1n <[email protected]> | 2019-11-27 22:57:39 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-11-27 22:57:39 -0800 |
| commit | 2d74950cf107daa391dba6f483a390e57c60dd0b (patch) | |
| tree | 3574985152c31ba2b9a97ad4d1f33c0b5bc0e206 /cpp-multiply/src | |
| parent | Initial commit (diff) | |
| download | cpp-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.cpp | 26 |
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 |