aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk5/lab4/partner2.cpp
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-03-27 12:54:31 -0500
committerRossTheRoss <msattr@gmail.com>2019-03-27 12:54:31 -0500
commit009b88b68380dc7cfd73bef77ddc86afe363d5cd (patch)
tree8fba7fe4914b54ccedb0dcc4768ca28561ae5050 /ee1301/wk5/lab4/partner2.cpp
parentPost-Spring Lab (diff)
downloadhomework-009b88b68380dc7cfd73bef77ddc86afe363d5cd.tar
homework-009b88b68380dc7cfd73bef77ddc86afe363d5cd.tar.gz
homework-009b88b68380dc7cfd73bef77ddc86afe363d5cd.tar.bz2
homework-009b88b68380dc7cfd73bef77ddc86afe363d5cd.tar.lz
homework-009b88b68380dc7cfd73bef77ddc86afe363d5cd.tar.xz
homework-009b88b68380dc7cfd73bef77ddc86afe363d5cd.tar.zst
homework-009b88b68380dc7cfd73bef77ddc86afe363d5cd.zip
More lab
Diffstat (limited to '')
-rw-r--r--ee1301/wk5/lab4/partner2.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/ee1301/wk5/lab4/partner2.cpp b/ee1301/wk5/lab4/partner2.cpp
index 3313e8c..ef0958c 100644
--- a/ee1301/wk5/lab4/partner2.cpp
+++ b/ee1301/wk5/lab4/partner2.cpp
@@ -5,7 +5,7 @@ using namespace std;
string requestName();
double requestHeight(string fullName);
int requestNumberOfPartners();
-
+void NotinMain(string array1[], const int length1, double array2[], const int length2);
int main()
{
@@ -16,11 +16,7 @@ int main()
height[0] = requestHeight(fullName[0]);
fullName[1] = requestName();
height[1] = requestHeight(fullName[1]);
-
- cout << "If " << fullName[0] << " and " << fullName[1]
- << " form a human tower, their combined height will be "
- << (height[0] + height[1]) << endl;
-
+ NotinMain(fullName, 2, height, 2);
}
string requestName()
@@ -50,3 +46,8 @@ int requestNumberOfPartners()
return numberOfPartners;
}
+void NotinMain(string array1[], const int length1, double array2[], const int length2) {
+ cout << "If " << array1[0] << " and " << array1[1]
+ << " form a human tower, their combined height will be "
+ << (array2[0] + array2[1]) << endl;
+ } \ No newline at end of file