summaryrefslogtreecommitdiff
path: root/cpp-multiply
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
parentInitial commit (diff)
downloadcpp-examples-2d74950cf107daa391dba6f483a390e57c60dd0b.tar.xz
cpp-examples-2d74950cf107daa391dba6f483a390e57c60dd0b.zip
Add files via upload
Diffstat (limited to 'cpp-multiply')
-rw-r--r--cpp-multiply/README.md59
-rw-r--r--cpp-multiply/src/main.cpp26
2 files changed, 85 insertions, 0 deletions
diff --git a/cpp-multiply/README.md b/cpp-multiply/README.md
new file mode 100644
index 0000000..f7a8978
--- /dev/null
+++ b/cpp-multiply/README.md
@@ -0,0 +1,59 @@
+```
+___ ___ _ _ _ _
+| \/ | | | | (_) | |
+| . . |_ _| | |_ _ _ __ | |_ _
+| |\/| | | | | | __| | '_ \| | | | |
+| | | | |_| | | |_| | |_) | | |_| |
+\_| |_/\__,_|_|\__|_| .__/|_|\__, |
+ | | __/ |
+ |_| |___/
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+```
+
+<!-- ABOUT THE PROJECT -->
+## About The Project
+
+Multiplying in C++.
+
+
+
+<!-- GETTING STARTED -->
+## Getting Started
+
+[Clone or download](https://github.com/8cy/cpp-multiply) the project and run in your favourite choice of [IDE](https://en.wikipedia.org/wiki/IDE) or [Text Editor](https://en.wikipedia.org/wiki/Text_editor) with a Code Runner.
+
+> *[Code Runner](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner) by [Jun Han](https://marketplace.visualstudio.com/publishers/formulahendry) on the [VSCode Marketplace](https://marketplace.visualstudio.com/) is my Code Runner of choice but you can feel free to use anything that works for you.*
+
+### Prerequisites
+
+This is an example of how to list things you need to use the software and how to install them.
+* Your favourite C++ Compiler
+
+
+
+<!-- CONTRIBUTING -->
+## Contributing
+
+Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
+
+1. Fork the Project
+2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
+3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
+4. Push to the Branch (`git push origin feature/AmazingFeature`)
+5. Open a Pull Request
+
+
+
+<!-- LICENSE -->
+## License
+
+Distributed under the MIT License. See [`LICENSE`](/LICENSE) for more information.
+
+
+
+<!-- CONTACT -->
+## Contact
+
+s1nical - [@s1nical](https://twitter.com/s1nical) - [email protected]
+
+Project Link: [https://github.com/8cy/cpp-multiply](https://github.com/8cy/cpp-multiply)
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