Find Jobs
Hire Freelancers

I have an assignment to complete in c language ...

₹100-400 INR / hour

処理中
投稿日: 約4年前

₹100-400 INR / hour

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
プロジェクト ID: 23622577

プロジェクトについて

1個の提案
リモートプロジェクト
アクティブ 4年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
アワード者:
ユーザーアバター
hello there i have read and understood the project details and due to my vast experience in the industry i will deliver quality and on time within your budget....just say hello
₹250 INR 40日以内
0.0 (0 レビュー)
0.0
0.0

クライアントについて

INDIAのフラグ
Chandigarh, India
4.4
23
お支払い方法確認済み
メンバー登録日:3月 27, 2019

クライアント確認

ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。