U E D R , A S I H C RSS

새싹교실/2012/아우토반/앞반/4.12



1. 명단


O
O
O

2.

  • rand, srand
  • time(NULL)
  • 로그램 보기

3.


1. 대 때리기 게 .
:
1) 0 가 되면 게
2)
3) 는 두 가 공격 방 나를 다 : ,
4)
-
대 : 1000
: 500
- 공격력
대 : 50~100
: 80~100
: 50~150

2. 관리 로그램 .



4.

  • : 기는 F4(ThreeFs + Future Action Plan) 맞게 .
    • 관련 : ThreeFs, ThreeFs(노), FiveFs(노)
    • 러보기
      • Facts, Feelings, Findings, Future Action Plan. , , 느낀 , 깨달 , .
      • 를 들 를 먹 기를 다면 : " 강남 5만를 먹다.() 기대를 는데 다.(느낌) 강남 땅값 값만 보고 라 기대된다는 것 다.(깨달) 다는 미리 보고 가봐겠다.( )"



5.






#include<stdio.h>
#include<time.h>
#include<math.h>
#include<stdlib.h>



void main(){
int Sundae = 1000;
int Player = 500;


int sundaeattack;
int userkick;
int userpunch;
int user_attack_type;

	printf("대 때리기 게 start!\n");
	printf(" 력 : %d\n",Sundae);
	printf(" 력 : %d\n",Player);

	printf(" 공\n");

	srand((unsigned)time(NULL));

	while(Sundae>=1){
			sundaeattack = rand()%101+50;
			Player - sundaeattack;
			printf("Player는 %d 데미다.\n",sundaeattack);
			printf("User 공격방법  : Punch = p , Kick = k : \n");
			scanf("%c",&user_attack_type);

		for(Player;Player<=0;)
			{
			if(user_attack_type == 'p'){
				userpunch = rand()%101+80;
				Sundae - userpunch;
				printf("User가 %d 데미다.\n",userpunch);

			}
			if(user_attack_type == 'k'){
				userkick = rand()%151+50;
				Sundae - userkick;
				printf("User가 %d 데미다.\n",userkick);
			}
			continue;

		}
			
	
	
	
	
	if(Sundae <= 0 && Player <= 0){
		printf("둘다 ㅠ\n");
		break;
	}
	else if(Sundae <= 0){
		printf("대를 E겼다 !!EE!!\n");
		break;
	}
	else if(Player <= 0){
		printf("ㅠ\n");
		break;
	}
	}
	printf("게 료!..\n");

	system("pause"); 
}

문는 for문 다.... 무 닌것... 게 뭔...
continue  법과 switch case 'p'     모르겠.
  ㅠㅠ

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