C++ recursive function

C++ recursive function

how would I write these functions recursively in c++

int account::findAccount(int acctNumber, account accts[MAX], int count)

{

for (int i = 0; i < count; i++)

{

if (accts[i].acctNumber == acctNumber)

return i;

}

return -1;

}

And this function as well

void account::displayAll(account accts[MAX], int count)

{

for (int i = 0; i < count; i++)

{

accts[i].displayAccount();

cout << endl;

}

}

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper