== main.cpp == {{{ #include <stdio.h> struct unit { int att; int def; int HP; }; void main() { unit zeli1={5,0,50}; unit zeli2={5,0,50}; while(zeli2.HP>0) { zeli2.HP -= zeli1.att; printf("ì €ê¸€ë§1ì´ ì €ê¸€ë§2ì— ë°ë¯¸ì§€ %d를 입혀서 ì €ê¸€ë§2ì˜ HPê°€ %dê°€ ë˜ì—ˆìŠµë‹ˆë‹¤.\n", zeli1.att, zeli2.HP); } printf("ì €ê¸€ë§2ê°€ 죽었습니다.\n"); } }}}