Find Jobs
Hire Freelancers

C++ two dimensional array

$30-250 USD

Terminado
Publicado hace más de 11 años

$30-250 USD

Pagado a la entrega
Write a C++ program, [login to view URL], that randomly finds a path from the center of a two dimensional array. The program first initializes a two dimensional char array to all periods. The program starts at the middle of the array. It places an ‘a’ at this spot in the array. It then repeatedly picks a random direction (up, down, left or right) that travels to a spot not yet visited and places the next letter of the alphabet there. The program stops when the pathway reaches an edge of the array or there is no legal spot to move. You are required to write the following functions to help solve the problem: // set all spots in the board equal to period // characters void init_board (char board [max_row][max_col]); // sets row and col equal to a new row and column using // a random move (up, down, left or right) to a spot in // the array not yet visited void move (char box[max_row][max_col], int& row, int& col); // prints the array in two dimensional format preceded by // a label void print (char box [max_row][max_col]); max_row and max_col are constants giving the size of the array. The program should work for different values of max_row and max_col. When the lowercase alphabet is exhausted, the markers should change to the uppercase alphabet. When the uppercase alphabet is exhausted, the markers should change back to lowercase alphabet, and so on. If an edge of the array is reached, the word “Success” should be printed along with the array. When there is no legal move from a spot, the word “Failure” should be printed along with the array. Two runs of the program with max_row = 20 and max_col = 50 are shown on the back of this handout. The program should run differently each run. When done, place the [login to view URL] file in the Homework 2 Drop Box on Angel. Run 1 (max_row = 20, max_col = 30): Success! The path is: .............................. .............................. .............................. .............................. .............................. .............................. .............................. .............................. .........................vwzA. ...............a.........uxyBC .............feb.....VWXst.... .............gdcPQRSTU.Yr..... ............ih..ON.....Zqp.... ............juv..M.....ano.... ..........mlktw.KLGF...bml.... ..........norsxyJIHE...c.kji.. ...........pq..zABCD...defgh.. .............................. .............................. .............................. Run 2 (max_row = 15, max_col = 30): Failure! The path is: .............................. .............................. .............................. .............................. .............................. ............gf................ ............hedc.............. .........nmli..b.............. .........oxkj..a.............. .........pwv.................. .........q.u.................. .........rst.................. .............................. .............................. ..............................
ID del proyecto: 2490089

Información sobre el proyecto

9 propuestas
Proyecto remoto
Activo hace 12 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
I'm a computer science student.I have experience in C++.I'll do it within a [login to view URL] accept my bid!
$30 USD en 1 día
5,0 (1 comentario)
1,0
1,0
9 freelancers están ofertando un promedio de $78 USD por este trabajo
Avatar del usuario
Hi, I am C++ expert and can handle this project perfectly according to specification. Please check your inbox, Thanks
$30 USD en 1 día
4,8 (46 comentarios)
5,7
5,7
Avatar del usuario
Hi, kindly check your inbox for my inquiries. Thanks.
$30 USD en 1 día
4,9 (71 comentarios)
5,4
5,4
Avatar del usuario
I am expert in C++.please check my PM
$35 USD en 0 día
4,9 (26 comentarios)
5,4
5,4
Avatar del usuario
Sir we have 100% completion rate...Checl PM for completed sample. Thanks
$30 USD en 1 día
5,0 (31 comentarios)
4,4
4,4
Avatar del usuario
I can do it in next 24 hours...
$70 USD en 1 día
4,9 (10 comentarios)
3,6
3,6
Avatar del usuario
Let's do this. Please read my message in your inbox. Thank you.
$75 USD en 3 días
5,0 (2 comentarios)
2,0
2,0
Avatar del usuario
Hello sir, please chose me to do this.
$150 USD en 2 días
5,0 (1 comentario)
1,3
1,3
Avatar del usuario
Hello, I have done similar type of program before and willing to to your work soon. check email for details. Thank you.
$250 USD en 15 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
Buffalo, United States
5,0
1
Forma de pago verificada
Miembro desde sept 9, 2012

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.