I have an assignment to complete in c language -- 2
₹600-1500 INR
Betales ved levering
a person is standing on feld[0] and has to make it to the end(feld[20])
the rules are
either forward those many steps the box has value((*s).feld[x])
or backward whole number of the half of the value
at last it should either return 0 or 1
0 being cannot be solved
1 being can be solved
this is the c file
#include
#include
#include "testat-7.h"
int huepfspiel(spielfeld * s, int nr);
int huepfspiel(spielfeld * s, int nr){
int rc = 0;
static int aufrufe;
int k;
++aufrufe;
printf("%d", aufrufe);
if(nr == 20)
rc = 1;
if(nr != 20 && aufrufe < 4000){
for(k=0; k<=1; k++){
if(k == 1 && (nr + (*s).feld[nr] = 0)){
nr = (nr - (((*s).feld[nr])/2));
rc = huepfspiel(&s, nr);
if(rc == 1)
break;
}
}
// ...
}
return rc;
}
int main() {
spielfeld s = {20, {5,3,2,1,7,5,1,2,3,4,5,1,3,7,1,5,1,9,0,1}};
//printf("%d", [login to view URL][20]);
printf("Loesbar: %d\n", huepfspiel(&s, 0));
return 0;
}
-----------------------------------------------------------
and this is the header file
#ifndef _TESTAT_7_H
#define _TESTAT_7_H
typedef struct {
int n; // Feldgroesse
int feld[20]; // Spielfeld
} spielfeld;
#endif
Prosjekt-ID: #23622566
Om prosjektet
9 frilansere byr i gjennomsnitt ₹1094 for denne jobben
Hello , I have made a solution based on the code you have uploaded. I can share with you if you award me the bid. Please discuss on chat. Thanks.
I will work on the program, it seems pretty straightforward. I plan on using backtracking algorithm to find the solution. I have immense experience with c/c++.
Sir i am the student of me and engineering and i have studied C++ one of my subject i will complete your task in less timee please hire me
Solved this question however,I posses required skills and desire to work on this project which makes me different from crowd.I would love to be part of this project and use and enhance my skills.