농구게임인데요...
소희
2023.09.15
#include stdio.h
#include stdlib.h
int main(void)
{
int a[2], b[2];
int i=0;
while(i2)
{
a[i]=rand()%3+1;
b[i]=rand()%3+1;
if(a[i]b[i])
{
printf(플레이어가%d점 컴퓨터가%d점으로 플레이거아이겻습니다/ \n, a[i], b[i]);
}
else if(b[i]a[i])
{
printf(컴퓨터가%d점 플레이어가%d점으로 컴퓨터가 이겻습니다. \n, b[i], a[i]);
}
else
{
printf(컴퓨터가%d점 플레이어가 %d점으로 비겻습니다. \n, b[i], a[i]);
}
i++;
}
return 0;
}
여기서 while문을 안나오네요.ㅣ.
왜이러는거죵?
-
빛초롱 2023-09-15
넵 감사합니다
-
남천 2023-09-15
저도 나오는데요??? 그리고 #includetime.h 헤더파일이랑 srand(time(NULL));--rand함수 초기화
이거까지 넣으셔서 완성도를 높이세요