aboutsummaryrefslogtreecommitdiff
path: root/8a/8aCode/8aCode.cpp
diff options
context:
space:
mode:
authorJacobAKnox <[email protected]>2021-10-23 09:53:44 -0700
committerJacobAKnox <[email protected]>2021-10-23 09:53:44 -0700
commitc790cb06242c72a10e2e01036b9de7cc37088763 (patch)
tree258139a7b56f8d6126721d5073c83e57957d3b2d /8a/8aCode/8aCode.cpp
parent7c finished (diff)
downloadcst116-lab4-jacobaknox-master.tar.xz
cst116-lab4-jacobaknox-master.zip
8a and 8bHEADmaster
Diffstat (limited to '8a/8aCode/8aCode.cpp')
-rw-r--r--8a/8aCode/8aCode.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/8a/8aCode/8aCode.cpp b/8a/8aCode/8aCode.cpp
new file mode 100644
index 0000000..e876c71
--- /dev/null
+++ b/8a/8aCode/8aCode.cpp
@@ -0,0 +1,38 @@
+// 8aCode.cpp : This file contains the 'main' function. Program execution begins and ends there.
+//
+
+#include <iostream>
+using namespace std;
+
+void readValues(int& a, int& b);
+double divideValues(int a, int b);
+
+int main()
+{
+ int a, b;
+ double out;
+
+ readValues(a, b);
+ out = divideValues(a, b);
+
+ cout << "The double value of " << a << "/" << b << " is: " << out << ".";
+}
+
+
+void readValues(int& a, int& b)
+{
+ cout << "Input the first int: ";
+ cin >> a;
+ cout << "\nInput the second int: ";
+ cin >> b;
+ cout << "\n\n";
+ return;
+}
+
+double divideValues(int a, int b)
+{
+ double value;
+
+ value = (double)a / (double)b;
+ return value;
+} \ No newline at end of file