Giúp tìm lỗi sai trong c

đề của nó là viết chương trình để máy chọn 1 số ngẫu nhiên rồi nó cho mình đoán, nếu đoán đúng thì kết thúc sau khi kết thúc đưa ra lựa chọn có chơi tiếp hay không.

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc,char** argv)
{
int soBiMat = 0, soHienTai =0,solandoan;
const int MAX= 10, MIN=1;
srand(time(NULL));
soBiMat = (rand() % (MAX - MIN + 1) + MIN);
solandoan=1;
do
{

printf("So can tim la bao nhieu ? ");
scanf("%d",&soHienTai);
 if (soBiMat != soHienTai)
 {
 	solandoan++;
 	if(soBiMat>soHienTai)
printf("Lon hon !\n");
else if (soBiMat<soHienTai)
printf("Nho hon !\n");
}
else
printf("Chuc mung ! Ban da tim duoc so bi mat sau %d lan doan \n",solandoan);
} while (soHienTai!=soBiMat);



int tieptucgame; // lua chon xem co choi nua hay khong
{

do
{
printf("1.tiep tuc game \n ");
printf("2.ket thuc game \n ");
scanf("%d",tieptucgame);

 if(tieptucgame==1)
{
	srand(time(NULL));
soBiMat = (rand() % (MAX - MIN + 1) + MIN);
do
{

printf("So can tim la bao nhieu ? ");
scanf("%d",&soHienTai);
 if (soBiMat != soHienTai)
    {
 	solandoan++;
 	if(soBiMat>soHienTai)
printf("Lon hon !\n");
else if (soBiMat<soHienTai)
printf("Nho hon !\n");
}
else
printf("Chuc mung ! Ban da tim duoc so bi mat sau %d ân doan !!! \n ",solandoan);
} while (soHienTai!=soBiMat);
}

 if (tieptucgame==2)
 printf(" tam biet");
 
}while (tieptucgame !=2);
}
return 0;
}

Hi Trường Vũ.

Bạn thiếu dấu & ở trước chỗ scanf tiếp tục chơi game. Mình khuyên nên thêm hàm fflush(stdin); ở trước dòng scanf đó thôi.

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?