diff options
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 |