C로 구현한 야구게임
본 자료는 미리보기를 지원하지 않습니다.
닫기
  • 1
  • 2
  • 3
해당 자료는 1페이지 까지만 미리보기를 제공합니다.
1페이지 이후부터 다운로드 후 확인할 수 있습니다.

목차

없음

본문내용

/
#include
#include
#include

#define random(num) ( (unsigned int)rand()%num )


int input ( int * );

int main()
{
int source[3];

int inputnum[3];

int realnum = 0, i = 0, j = 0, ball = 0, strike = 0;

srand((unsigned)time(NULL));

source[0] = random(9) + 1;

source[1] = random(9) + 1;

source[2] = random(9) + 1;

for( i = 0 ; i < 3 ; i++)
{
for(j = 0; j < i ; j++)
{
while( source[i] == source[j])
source[i] = random(9);
}
}

// printf(`%d %d %d
`,source[0],source[1],source[2]); //이것을 넣고 보면 확인하기 편함..^^

printf(`숫자를 집어넣으세요...각각 틀린 숫자 3자리를 집어 넣는겁니다...
`);

realnum = input( inputnum );

키워드

  • 가격300
  • 페이지수3페이지
  • 등록일2010.06.08
  • 저작시기2003.11
  • 파일형식기타(c)
  • 자료번호#617635
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니