From f723dfc4e62130892c10e484e55417f6c9679d00 Mon Sep 17 00:00:00 2001 From: 201816040317 <56635386+201816040317@users.noreply.github.com> Date: Sun, 20 Oct 2019 12:01:51 +0800 Subject: [PATCH 1/2] Update Ex06_50.cpp --- 201816040317/Ex06_50.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/201816040317/Ex06_50.cpp b/201816040317/Ex06_50.cpp index 8960e30..263cd86 100644 --- a/201816040317/Ex06_50.cpp +++ b/201816040317/Ex06_50.cpp @@ -7,18 +7,18 @@ void tripleByReference(int & );//pass-by-reference int main() { - int count1,count2; + int count; - cin>>count1; - cin>>count2; + cout<<"Enter a value for count:"; + cin>>count; - cout<<"count1="< Date: Sun, 20 Oct 2019 22:54:20 +0800 Subject: [PATCH 2/2] Create Ex06_50.cpp This my assignment01; My ID is:201816040317 --- Ex06_50.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Ex06_50.cpp diff --git a/Ex06_50.cpp b/Ex06_50.cpp new file mode 100644 index 0000000..263cd86 --- /dev/null +++ b/Ex06_50.cpp @@ -0,0 +1,34 @@ +#include + +using namespace std; + +int tripleByValue(int);//pass-by-value +void tripleByReference(int & );//pass-by-reference + +int main() +{ + int count; + + cout<<"Enter a value for count:"; + cin>>count; + + + cout<<"Value of count before call to tripleByValue() is:"<