0
Plz help to fix
4 odpowiedzi
+ 1
Pass the variable n to the call of function as below :
cout << times(8, n) << endl;
......
.....
Moreover you should modify the definition of the function as :
int times (int x, int n) {
+ 1
Line 4 : int timesTwo,n(int x) {
remove the n
Line 7: cin>>n;
add it inside timesTwo function body and before call it
declare the variable n as int n
----------------
Question : If your function name is "timesTwo" why do you want user to input it ?
I think that n should be constant and equal to 2
+ 1
At last, u taught me something!
May Almighty helps u in need