SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 1 Day Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 18 Nov 2017 My Price 10.00

Visual studio project needed with C++ code

Visual studio project needed with C++ code

 

Instructions:

 

I've put together some rough code already and just need it tweaked and reviewed to fit the criteria of this project or can create own. Please review .cpp file.

 

Modify the Acker function so that it utilizes memoization. See if you can get your modified function to calculate the following values:

Acker(3,20) = 8388605

Acker(4,0)  = 13

Acker(4,1)  = 65533

You almost certainly will need to change the default Stack Reserve Size to about 1 billion. This Project Properties option is found under Configuration Properties | Linker | System.

 

 

 

instuctions1.png//Define Acker Function
int Acker(int m, int n)
{
//Declare a variable
int resultValue;
//If m is equal to 0
if (m==0)
//Assign n+1 as result value
resultValue = n+1;
//if n value is equal to 0
else if (n==0)
//Recursively call the result Value
resultValue = Acker(m-1, 1);
//Return the result
return resultValue;
}


//Include Header files
#include
using namespace std;
//Define function Acker
int Acker(int m, int n)
{
//Declare variable
int resultValue;
//If m is equal to 0
if (m==0)
//Assign n+1 as a result value
resultValue = n+1;
//If n value is equal to 0
else if (n==0)
//Recursively call the result Value
resultValue = Acker(m-1, 1);
//Else statement
else
//Recursively call the result Value
resultValue = Acker(m-1, Acker(m, n-1));
//Return the result
return resultValue;
}

//Main function
int main()
{
//Print Answer
cout<<"Answer:"<
//Pause Console Window
system("pause");
//Return statement
return 0;
}

Attachments:

Answers

(5)
Status NEW Posted 18 Nov 2017 01:11 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)