diff options
Diffstat (limited to 'cpp-multiply')
| -rw-r--r-- | cpp-multiply/README.md | 59 | ||||
| -rw-r--r-- | cpp-multiply/src/main.cpp | 26 |
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 |