Cho nhận xét về cách dùng boolean và rút gọn chương trình

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
    int so_bimat=0,so_hientai=0,count=0,mode=1,nguoichoi=1,MAX=0,capdo=0;
    const int MIN = 1;
    printf("===CHON MODE===\n");
    printf("1 nguoi choi bam phim 1\n");
    printf("2 nguoi choi bam phim 2\n");
    scanf("%d",&mode);
    int tieptuc_game = 1;
     while(tieptuc_game)
    {
        do
            {
            printf("Xin moi ban chon cap do choi\n");
            printf("de\n");
            printf("trung binh\n");
            printf("kho\n");
            scanf("%d",&capdo);
            switch(capdo)
            {
            case 1:
                MAX = 100;
                break;
            case 2:
                MAX *=10;
                break;
            case 3:
                MAX *=100;
                break;
            default:
           printf("Xin moi ban chon cap do choi\n");
           break;
            }
            }
            while (capdo>3);
       srand(time(NULL));
    so_bimat = (rand()%(MAX - MIN + 1) + MIN);
        if (mode == 1)
        {
    do
    {
    printf("So can tim la bao nhieu?");
    scanf("%d",&so_hientai);
    count++;
    if (so_hientai > so_bimat)
        printf("nho hon !\n");
    else if (so_hientai < so_bimat)
        printf("lon hon !\n");
    else
         printf("Chuc mung! ban da tim so bi mat trong %d lan doan\n",count);
    }
     while (so_bimat != so_hientai );
        }
        else
        {
          do
    {
    printf("So can tim la bao nhieu?\n");
    switch (nguoichoi)
    {
    case 1:
    printf("nguoi choi thu %d:",nguoichoi);
    scanf("%d",&so_hientai);
    if (so_hientai > so_bimat)
        printf("nho hon !\n");
    else if (so_hientai < so_bimat)
        printf("lon hon !\n");
    else
         printf("Chuc mung! nguoi choi thu %d da thang\n",nguoichoi);
         nguoichoi++;
         break;
    case 2 :
        printf("nguoi choi thu %d:",nguoichoi);
    scanf("%d",&so_hientai);
    if (so_hientai > so_bimat)
        printf("nho hon !\n");
    else if (so_hientai < so_bimat)
        printf("lon hon !\n");
    else
         printf("Chuc mung! nguoi choi thu %d da thang\n",nguoichoi);
         nguoichoi--;
         break;
    }
    }
     while (so_bimat != so_hientai );
        }
    printf("Ban co muon tiep tuc game?\n");
    printf("Co / bam phim 1\n");
    printf("Khong / bam phim 0\n");
    scanf("%d",&tieptuc_game);
    }

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