#include<stdio.h>
int Atk(int life, int damageSatan)
{ // (勇者のライフ-被ダメ) を処理する関数
printf("魔王の攻撃。勇者は%dのダメージを受けた\n",damageSatan
); return life - damageSatan;
}
int Recover(int life, int kaifuku)
{ // (勇者のライフ+回復) を処理する関数
printf("勇者は薬草を使った。%d回復した。\n",kaifuku
); return life + kaifuku;
}
void gennzai(int life)
{ //現在のライフを書き出すだけの関数
}
int main(void)
{
int life = 1000;
gennzai(life);
life = Atk(life, 400);
gennzai(life);
life = Recover(life, 50);
gennzai(life);
life = Atk(life, 200);
gennzai(life);
// while(1){};
}
I2luY2x1ZGU8c3RkaW8uaD4KCmludCBBdGsoaW50IGxpZmUsIGludCBkYW1hZ2VTYXRhbikKewkvLyAo5YuH6ICF44Gu44Op44Kk44OV77yN6KKr44OA44OhKSDjgpLlh6bnkIbjgZnjgovplqLmlbAKCXByaW50Zigi6a2U546L44Gu5pS75pKD44CC5YuH6ICF44GvJWTjga7jg4Djg6Hjg7zjgrjjgpLlj5fjgZHjgZ9cbiIsZGFtYWdlU2F0YW4pOwoJcmV0dXJuIGxpZmUgLSBkYW1hZ2VTYXRhbjsKfQoKaW50IFJlY292ZXIoaW50ICBsaWZlLCBpbnQga2FpZnVrdSkKewkvLyAo5YuH6ICF44Gu44Op44Kk44OV77yL5Zue5b6pKSDjgpLlh6bnkIbjgZnjgovplqLmlbAKCXByaW50Zigi5YuH6ICF44Gv6Jas6I2J44KS5L2/44Gj44Gf44CCJWTlm57lvqnjgZfjgZ/jgIJcbiIsa2FpZnVrdSk7CglyZXR1cm4gbGlmZSArIGthaWZ1a3U7Cn0KCnZvaWQgZ2VubnphaShpbnQgbGlmZSkKewkvL+ePvuWcqOOBruODqeOCpOODleOCkuabuOOBjeWHuuOBmeOBoOOBkeOBrumWouaVsAoJcHJpbnRmKCLnj77lnKjjga7jg6njgqTjg5UlZFxuIixsaWZlKTsKfQoKaW50IG1haW4odm9pZCkKewoJaW50IGxpZmUgPSAxMDAwOwoJZ2VubnphaShsaWZlKTsKCWxpZmUgPSBBdGsobGlmZSwgNDAwKTsKCWdlbm56YWkobGlmZSk7CglsaWZlID0gUmVjb3ZlcihsaWZlLCA1MCk7CglnZW5uemFpKGxpZmUpOwoJbGlmZSA9IEF0ayhsaWZlLCAyMDApOwoJZ2VubnphaShsaWZlKTsKCi8vCXdoaWxlKDEpe307Cn0K