U E D R , A S I H C RSS

데블스캠프2010/다섯째날/Object Craft/미션1/김상호

#include<stdio.h>

typedef struct z{
	int gong;
	int bang;
	int hp;
}unit;

int main()
{
	unit a[2];
	a[0].gong=5;
	a[0].bang=0;
	a[0].hp=50;
	a[1].gong=5;
	a[1].bang=0;
	a[1].hp=50;
	
	while(a[1].hp>0)
	{
		a[1].hp -= a[0].gong;
		printf("저글링 0이 저글링 1에게 데미지 %d를 입혀 HP가 %d가 되었다.\n", a[0].gong, a[1].hp);
	}
	
	return 0;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:10
Processing time 0.0197 sec