Peruttu

C-ohjelmointi Job by drcpp

Hi,

Below is a simple 17 lines and efficient solution for the robot on grid task, if you like it you can pay the $5, if you have any question or want to modify it just let me know:

unsigned N = 2; // Limits

unsigned path(unsigned x, unsigned y)

{

unsigned p = 0;

if (x <= N && y <= N) // check boundaries, or obstacles

{

++p; // current node

p += path(x+1, y); // go right

p += path(x, y+1); // go down

}

return p;

}

int main(int argc, char** argv)

{

unsigned p = path(1, 1); // Starting point

return 0;

}

Taidot: C-ohjelmointi

Näytä lisää: drcpp, robot grid, robot modify, grid robot, robot project, flash video player custom time current total, setup project custom form vbnet, setup project custom form, setup project custom, web service project custom fields sharepoint, project custom button image, deployment project custom message, setup project custom user interface, deployment project custom license number, dotproject project custom sort

Tietoa työnantajasta:
( 2 arvostelua ) London, United Kingdom

Projektin tunnus: #4269519

1 freelancer is bidding on average £30 for this job

MciprianM

Hired by the Employer

30 £ GBP 1 päivässä
(0 arvostelua)
0.0