U E D R , A S I H C RSS

데블스캠프2010/다섯째날/Object Craft/미션1/변형진

#include <stdio.h>

struct zergling {
	int hitP;
} zerglings[2];

int main() {
	int i = 0;
	zerglings[0].hitP = zerglings[1].hitP = 50;
	while (zerglings[1].hitP > 0) {
		int damage = 5 - 0;

		zerglings[1].hitP -= damage;
		printf("저글링 0이 저글링 1에게 데미지 %d를 입혀 HP가 %d가 되었습니다.\n", damage, zerglings[1].hitP);
	}

	printf("저글링 1이 죽었습니다.\n");

	getchar();
	return 0;
}

돌아가기

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:10
Processing time 0.0120 sec