#include "blike.h" main() { int a, b, c, d, e, f; cls(); e = 0; f = 200; a = rnd(10); b = rnd(79); c = 0; for (;;) { locate(b, c); printf("%d", a); if (c == 23) { break; } locate(0, 0); printf("点数 = %d 速さ = %d ", e, f); wait(f); locate(b, c); printf(" "); d = inkey(); if (d == a + 48) { e += 23 - c; /* また別の数字を落とす */ a = rnd(10); b = rnd(79); c = 0; f--; if (f < 10) { f = 10; } } else { c++; if (d != 0) { e -= 23 - c; } if (e < 0) { e = 0; } } } }
(This host) = http://osask.net