2 ¶
- , , GCC, , main, 변, Data Type, , 본 , 문 -
번 돼! ( )
1. Ice Breaking Wiki .
2. , 받 내 물보, 리 물보. 물보.미는 목. 등
3. 들 딩
4. 모르는 API 문 보 http://winapi.co.kr -> 2 딩 Q&A
5. 들 Wiki 내 보
1. 및
http://wiki.zeropage.org/wiki.php//2011/무/벨4
는 린 들 복 + 붙 못!
http://wiki.zeropage.org/wiki.php//2011/무/벨4
는 린 들 복 + 붙 못!
/// 리 !!
#include<stdio.h>
#include<math.h> //Rand를 는 더
#include<stdlib.h>
#include<time.h>
#define KICK 350
#define PUNCH 200
#define SORAKICK 900
#define SORAPUNCH 1000
int main(){
// , 내 .
int Sora = 2500, My = 5000;
int temp; // 변
char select; //
srand(time(NULL)); //Rand 변.
printf("리 .\n");
printf(" : 06 11 Target : 11 \n");
while(1){
printf(" : %d\n",Sora);
printf("내 : %d\n",My);
printf(" : k 먹 : p\n");
//
select = getch(); //getch()는 char 를 받는 .
switch(select){
default: printf("못 \n"); break;
case 'k' :
temp = ( ( rand() % KICK +1)); //1~KICK 데미를 .
printf("를 . 데미 : %d 를 !\n",temp);
Sora = Sora - temp; break;
case 'p' :
temp = ( ( rand() % PUNCH +1));
printf("를 립. 데미 : %d 를 !\n",temp);
Sora = Sora - temp; break;
} //내
select = rand() %2 +1;// 덤.
switch(select){
case 1 :
temp = ( ( rand() % SORAKICK +1));
printf(" . 데미 : %d 를 !\n",temp);
My = My - temp; break;
case 2 :
temp = ( ( rand() % SORAPUNCH + 1));
printf(" 립. 데미 : %d 를 !\n",temp);
My = My - temp; break;
}// 덤
//
// 리 복
if(Sora <= 0 && My <= 0){
printf("Double KO. 러.\n");
break;
}
else if(Sora <= 0){
printf("를 !!! \\(* ^ * )/ \n");
break;
}
else if(My <= 0 ){
printf(" .. OTL \n");
break;//while문 .
}
// ?
}
printf("\nGame Over\n");
return 0;
}
※ 는 면 르는 ? 부 무.2. 딩 Q&A(모른면 르, 배 면 ! 백 는 )
2.1
2.1
2.2 #include<stdio.h>, printf(), scanf(); .
2.3 int, char, 변.
2.4 #define 문, 매
2.5 #include<math.h>, #include<stdlib.h>, #include<time.h>
srand(time(NULL)), rand(). 브러리.
srand(time(NULL)), rand(). 브러리.
2.6 If문, switch() { case : default : } 문.
3.
ACM 문를 보. 량 량 맞 *^_^* 뿌뿌~!
ACM 문를 보. 량 량 맞 *^_^* 뿌뿌~!
부 문
3.1 http://koistudy.net/?mid=prob_page&NO=152
3.2 http://koistudy.net/?mid=prob_page&NO=111
3.3 http://koistudy.net/?mid=prob_page&NO=145
3.4 http://koistudy.net/?mid=prob_page&NO=213
3.2 http://koistudy.net/?mid=prob_page&NO=111
3.3 http://koistudy.net/?mid=prob_page&NO=145
3.4 http://koistudy.net/?mid=prob_page&NO=213
디 : zeldababo 밀번 : rlawns
~! 보 !










