From 2d74950cf107daa391dba6f483a390e57c60dd0b Mon Sep 17 00:00:00 2001 From: s1n Date: Wed, 27 Nov 2019 22:57:39 -0800 Subject: Add files via upload --- cpp-multiply/src/main.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 cpp-multiply/src/main.cpp (limited to 'cpp-multiply/src/main.cpp') 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 +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 -- cgit v1.2.3